Pages: [1]   Go Down
Author Topic: Arduino MEGA e Adafruit serial camera  (Read 1110 times)
0 Members and 1 Guest are viewing this topic.
Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ciao.
Ho fatto un programma per fare foto e mandarle ad un webServer.
Con Arduino UNO tutto funziona.
Adesso vorrei passare al MEGA rev3.

Lasciando tutto come prima non trova la camera perchè immagino non vada qualcosa con la seriale tra la camera e Arduino.

Code:
SoftwareSerial cameraconnection = SoftwareSerial(6, 7);
Adafruit_VC0706 cam = Adafruit_VC0706(&cameraconnection);

Devo cambiare qualcosa?
Grazie
Logged

Tuscany
Offline Offline
Edison Member
*
Karma: 76
Posts: 2091
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

mah...

nell'esempio scrivono questo

Quote
// With the Arduino Mega, the choices are a bit more involved:
// 1) You can still use SoftwareSerial and connect the camera to
// a variety of pins...BUT the selection is limited. The TX
// pin from the camera (RX on the Arduino, and the first
// argument to SoftwareSerial()) MUST be one of: 62, 63, 64,
// 65, 66, 67, 68, or 69. If MEGA_SOFT_SPI is set (and using
// a conventional Arduino SD shield), pins 50, 51, 52 and 53
// are also available. The RX pin from the camera (TX on
// Arduino, second argument to SoftwareSerial()) can be any
// pin, again excepting those used by the SD card.
// 2) You can use any of the additional three hardware UARTs on
// the Mega board (labeled as RX1/TX1, RX2/TX2, RX3,TX3),
// but must specifically use the two pins defined by that
// UART; they are not configurable. In this case, pass the
// desired Serial object (rather than a SoftwareSerial
// object) to the VC0706 constructor.

e suggeriscono questa configurazione

Quote
// On Mega: camera TX connected to pin 69 (A15), camera RX to pin 3:
SoftwareSerial cameraconnection = SoftwareSerial(69, 3);

provare non costa niente
Logged

Milan
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ho trovato, nel MEGA ci sono 3 seriali dedicate.

Basta:
Code:
Adafruit_VC0706 cam = Adafruit_VC0706(&Serial1);

Serial1 è la prima seriale aggiuntiva sul MEGA e non va dichiarata.
N
Logged

Pages: [1]   Go Up
Jump to: