I'm trying to use the Camera tutorial on the SD card breakout board and Miniature TTL Serial Camera together with the Trinket Pro 3v. I'm using the snapshot example and I've compiled and sent it to the trinket.
At first I had a bit of a hard time compiling, softwareserial didn't work with the 12Mhz trinket but I believe I've found code via: http://fuzz4dev.BANNED.com/tag/12mhz/ towards the bottom to get it to "work" with 12Mhz.
I've set softwareserial to the correct pins, It compiles and sends however,
In serial the trinket identifies SD Card fine, however says "Camera Not Found". I'm assuming that the softwareserial object created isn't constructed in a way that is retrieving properly. Is this a correct assumption? Is there another library I should be using to compile this?
Thank you for your help!
Trinket + Softwareserial?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Trinket + Softwareserial?
I haven't tested the library modifications you linked. Have you verified that they work correctly at the camera's baud-rate? (57600 if I remember correctly).
- AnneBarela
- Learn User Page
- Posts: 757
- Joined: Sat Mar 24, 2012 8:56 pm
Re: Trinket + Softwareserial?
The Trinket classic defaults to 8 MHz. It can be ramped up in software to 16 MHz. It would take custom commands to have it run at 12 MHz.
The standard SoftwareSerial works fine on Trinket at 8 or 16 MHz.
The standard SoftwareSerial works fine on Trinket at 8 or 16 MHz.
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
The code mentions that baud rate but I havnt confirmed it works personally. Considering kitty's post I am curious if the trinket pro can go up to 18mhz safely and I can use software serial that way? Otherwise I'm having a hard time finding a softwareserial library that works with it
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Trinket + Softwareserial?
I don't know what the timing tolerances of the camera or the modified library are, but generally, the faster you go the more critical they are. I know that SoftwareSerial can be iffy at 115200 on a 16MHz Arduino.
You might be able to get the 5v version to run at 3.3v/16MHz. That clock-speed rating is only guaranteed at 5v by Atmel, but many samples can be 'overclocked' just fine.
You might be able to get the 5v version to run at 3.3v/16MHz. That clock-speed rating is only guaranteed at 5v by Atmel, but many samples can be 'overclocked' just fine.
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
The tutorial says the default baud rate is 38400 so hopefully the iffy-ness you mentioned is less iffy.
If I can get trinket to run at 18mhz I'll try that first.
If no dice then I'm going to try to replace the trinket with an uno to make sure it's something to do with the trinket and not something silly I'm doing.
If I can get trinket to run at 18mhz I'll try that first.
If no dice then I'm going to try to replace the trinket with an uno to make sure it's something to do with the trinket and not something silly I'm doing.
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
I meant 16 Mhz rather ^^
Well tried that and things went bananas. Serial read was gibberish so yeah.
I'll try the uno and tutorial vanilla tomarrow, I'm sure it will work.
Could it be the pins I've set the trinket to possibly? I have the camera's RX on trinket pin 9 and TX on 10, and respectively in the code:
SoftwareSerial cameraconnection = SoftwareSerial(10, 9);
Well tried that and things went bananas. Serial read was gibberish so yeah.
I'll try the uno and tutorial vanilla tomarrow, I'm sure it will work.
Could it be the pins I've set the trinket to possibly? I have the camera's RX on trinket pin 9 and TX on 10, and respectively in the code:
SoftwareSerial cameraconnection = SoftwareSerial(10, 9);
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
Or can I / should I, use something like http://www.adafruit.com/blog/2013/09/30 ... e-trinket/
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Trinket + Softwareserial?
I'd give Frank's 'Hardware Serial' a try.
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
USISerial wont even compile:
Long list of undeclared variables in USI_UART.c
:/
Long list of undeclared variables in USI_UART.c
:/
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Trinket + Softwareserial?
Are you trying to compile it directly, or include it as a library?USISerial wont even compile:
Try compiling the UsiSerialEcho example.
- theman8631
- Posts: 40
- Joined: Mon Sep 23, 2013 2:31 am
Re: Trinket + Softwareserial?
Those errors are from compiling the example sketch you mentioned. It references the errors occurring in the library itself though
- hiduino
- Posts: 862
- Joined: Sat Sep 01, 2012 7:05 pm
Re: Trinket + Softwareserial?
That UsiSerial library is written for an attiny mcu, the standard Trinket. I don't think it was meant to work the the Trinket Pro.
Please be positive and constructive with your questions and comments.