Hello and thanks for reading.
A few days ago i’ve got a Seeeduino mega. It works great so far, but i have a problem if i want to use serial communication for user data transfer (flashing sketches works fine).
My PC sends a string to Seeeduino via USB and this string should be simply send back (echoed) to the PC. Thats a loop, repeated each 2 seconds. This sketch and the PC program should not have bugs because all this works fine on 2 other arduino clones w/ atmega 328 ( i have no other 1280 board).
In addition my sketch lights the LED on pin 13 as long as Serial.available() returns true. This happens not with Seeeduino, only the FTDI RX LED indicates receiving. Baudrate at both sides is ok.
I use the original Arduino 0017 ide and i choose “board=Arduino mega”. There is no other choice making sense for an Atmega 1280, i think. This way, sketches without any serial commands run fine.
But if i run a simple led blinking sketch and insert only f.e. “Serial.begin(57600)” - for test purposes without any further serial commands - the sketch seems not to run (no LED blinks). It can be said, that as soon as serial lib will be included, the code hangs, freezes or whatever.
But why? As said before, all this works fine on Arduinos with Atmels 328. Is “board=Arduino mega” in the IDE not compatible enough for Seeeduino mega in this case?
Can somebody show me complete commands for avr-gcc and avrdude to compile the cpp source and flush the Seeeduino from command line?
Thanks for any help,