In the tutorial of TTL serial camera of adafruit.
learn.adafruit.com/ttl-serial-camera/overview
they have given that the camera is connected in 5 V supply and microSD breakout board is also connected in 5V supply.
I am using Miniature TTL camera and i m giving 3.3 V supply.
So how much supply should i have to provide in MicroSd breakout board?
TTL Serial JPEG Camera with NTSC Video
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 19
- Joined: Mon Oct 28, 2013 5:50 am
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: TTL Serial JPEG Camera with NTSC Video
The MicroSD breakout is designed for 5v, but it will probably work if you power it with 3.3v to the "3v" pin.
-
- Posts: 19
- Joined: Mon Oct 28, 2013 5:50 am
Re: TTL Serial JPEG Camera with NTSC Video
I am adding another work with the use of Adafruit Tutorial.
I have seen the tutorial of "Email Sending Movement Detector" in adafruit tutorials.
http://learn.adafruit.com/arduino-lesso ... r/overview
I have uploaded the code given in that tutorial in the arduino:
and made the connections of PIR with arduino as given in the tutorial.
I have installed python as well pyserial.
the python code given in the tutorial is given below:
I have made internet connection ON.
But now when i have RUN the python program.
Popup message opens and showing the error that
"There's an error in your program:
expected an indented block"
with highlighting of the "print("Sending Email")" line...
Kindly tell me how to fix this issue?
I have seen the tutorial of "Email Sending Movement Detector" in adafruit tutorials.
http://learn.adafruit.com/arduino-lesso ... r/overview
I have uploaded the code given in that tutorial in the arduino:
Code: Select all
int pirPin = 7;
int minSecsBetweenEmails = 60; // 1 min
long lastSend = -minSecsBetweenEmails * 1000l;
void setup()
{
pinMode(pirPin, INPUT);
Serial.begin(38400);
}
void loop()
{
long now = millis();
if (digitalRead(pirPin) == HIGH)
{
if (now > (lastSend + minSecsBetweenEmails * 1000l))
{
Serial.println("MOVEMENT");
lastSend = now;
}
else
{
Serial.println("Too soon");
}
}
delay(500);
}
I have installed python as well pyserial.
the python code given in the tutorial is given below:
Code: Select all
import time
import serial
import smtplib
TO = 'my email address'
GMAIL_USER = 'my email address'
GMAIL_PASS = 'my password'
SUBJECT = 'Intrusion!!'
TEXT = 'Your PIR sensor detected movement'
ser = serial.Serial('COM4', 9600)
def send_email():
print("Sending Email")
smtpserver = smtplib.SMTP("smtp.gmail.com",587)
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo
smtpserver.login(GMAIL_USER, GMAIL_PASS)
header = 'To:' + TO + '\n' + 'From: ' + GMAIL_USER
header = header + '\n' + 'Subject:' + SUBJECT + '\n'
print header
msg = header + '\n' + TEXT + ' \n\n'
smtpserver.sendmail(GMAIL_USER, TO, msg)
smtpserver.close()
while True:
message = ser.readline()
print(message)
if message[0] == 'M' :
send_email()
time.sleep(0.5)
But now when i have RUN the python program.
Popup message opens and showing the error that
"There's an error in your program:
expected an indented block"
with highlighting of the "print("Sending Email")" line...
Kindly tell me how to fix this issue?
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: TTL Serial JPEG Camera with NTSC Video
you need to add the indentation (tabs) see what it looks like on the tutorial page? make it look just like that with spaces at the beginning of lines
-
- Posts: 19
- Joined: Mon Oct 28, 2013 5:50 am
Re: TTL Serial JPEG Camera with NTSC Video
Thank you so much...It worked successfully
I have another doubt for my miniature TTL camera...
When i have connected TTL camera and MicroSD breakout with Arduino,
I have keep the baudrate to 38400 (Default baudrate of camera as given in the tutorial).
But it takes about 15-20 seconds to save one image. I think its taking too much time to transfer the image.
May i change the Baudrate to 115200 in the arduino code?
And In the Arduino code,
when i have uncommented to the image size line.
In the tutorial the images are of 10000 bytes to 12000 bytes size of the resolution of 320x240.
but i am getting 40000-45000 bytes size of the resolution of 320x240 which are the same as 640x480 resolution images.
How could i solve it? I want to transfer images faster.
I have another doubt for my miniature TTL camera...
When i have connected TTL camera and MicroSD breakout with Arduino,
I have keep the baudrate to 38400 (Default baudrate of camera as given in the tutorial).
But it takes about 15-20 seconds to save one image. I think its taking too much time to transfer the image.
May i change the Baudrate to 115200 in the arduino code?
And In the Arduino code,
when i have uncommented to the image size line.
Code: Select all
// Set the picture size - you can choose one of 640x480, 320x240 or 160x120
// Remember that bigger pictures take longer to transmit!
//cam.setImageSize(VC0706_640x480); // biggest
cam.setImageSize(VC0706_320x240); // medium
//cam.setImageSize(VC0706_160x120); // small
but i am getting 40000-45000 bytes size of the resolution of 320x240 which are the same as 640x480 resolution images.
How could i solve it? I want to transfer images faster.
-
- Posts: 19
- Joined: Mon Oct 28, 2013 5:50 am
Re: TTL Serial JPEG Camera with NTSC Video
Dear Sir,
Here i am stating my problems.
1) I am using adafruits tutorial for my work.
Link : http://learn.adafruit.com/ttl-serial-camera/overview
and the arduino code which i am using is same as provided in tutorial.
In the 1st attached image-"WIRED1.JPG"
I have got success to store the images into MicroSD card but when i
have connected Telegesis ETRX357 Zigbee modules as indicated in attached
image.
and run the program, but in the
Ardiuno's serial port, It shows me "No camera found"
that means my camera is not initialized through Zigbee.
I have established Zigbee network before running the program.
How could i resolve this problem?
2) I have tried another reference for my work.
Link: http://robotic-controls.com/book/export/html/53
In that i have succeded to store the text file (Jpeg is in HEX format)
into the MicroSD card and i have Converted text to JPEG using python
code given in website.
See attached Text file: PIC0.txt
Link: https://mail.google.com/mail/u/0/?ui=2& ... &safe=1&zw
now i have connected zigbee..
and run the program...
the text files having HEX format has been saved into the MicroSD card
but when i have converted the text file to jpeg, JPEG file created but
image viewer shows "Drawing failed".
The text file was having insufficient data, i mean the HEX of the
image should start with FFD8...and ends with FFD9 but in the hex file
which has obtained wirelessly is not starting with FFD8.
See attached Text file: PIC1.txt
Link: https://mail.google.com/mail/u/0/?ui=2& ... &safe=1&zw
That means in wired connection i get success but through zigbee, i
doesn't get image.
Please help me.
Here i am stating my problems.
1) I am using adafruits tutorial for my work.
Link : http://learn.adafruit.com/ttl-serial-camera/overview
and the arduino code which i am using is same as provided in tutorial.
In the 1st attached image-"WIRED1.JPG"
I have got success to store the images into MicroSD card but when i
have connected Telegesis ETRX357 Zigbee modules as indicated in attached
image.
and run the program, but in the
Ardiuno's serial port, It shows me "No camera found"
that means my camera is not initialized through Zigbee.
I have established Zigbee network before running the program.
How could i resolve this problem?
2) I have tried another reference for my work.
Link: http://robotic-controls.com/book/export/html/53
In that i have succeded to store the text file (Jpeg is in HEX format)
into the MicroSD card and i have Converted text to JPEG using python
code given in website.
See attached Text file: PIC0.txt
Link: https://mail.google.com/mail/u/0/?ui=2& ... &safe=1&zw
now i have connected zigbee..
and run the program...
the text files having HEX format has been saved into the MicroSD card
but when i have converted the text file to jpeg, JPEG file created but
image viewer shows "Drawing failed".
The text file was having insufficient data, i mean the HEX of the
image should start with FFD8...and ends with FFD9 but in the hex file
which has obtained wirelessly is not starting with FFD8.
See attached Text file: PIC1.txt
Link: https://mail.google.com/mail/u/0/?ui=2& ... &safe=1&zw
That means in wired connection i get success but through zigbee, i
doesn't get image.
Please help me.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: TTL Serial JPEG Camera with NTSC Video
Unfortunately, no. You can't change the baud rate. The camera has a baud-rate command, but it does not work.sohelmalek12 wrote:I have keep the baudrate to 38400 (Default baudrate of camera as given in the tutorial).
But it takes about 15-20 seconds to save one image. I think its taking too much time to transfer the image.
May i change the Baudrate to 115200 in the arduino code?
Regarding the ZigBee problem, I have no idea. We don't support ZigBee here. You may have better luck at a ZigBee forum.
-
- Posts: 19
- Joined: Mon Oct 28, 2013 5:50 am
Re: TTL Serial JPEG Camera with NTSC Video
Thank u
N for the wireless problem..I wil contact to the provider of that zigbee module.
N for the wireless problem..I wil contact to the provider of that zigbee module.
Please be positive and constructive with your questions and comments.