Code android e arduino

Hi @r0x15, I think you are trying to fix too many things at the same time. First develop and test your Ard program connected directly to the PC. The 2nd serial read, as @jay_m says, looks wrong, suggest remove. You are using Serial.print to see what’s happening, but in the final arrangement they will arrive in the Processing sketch. Is that what you want? As you are using a Mega you could use one of the other Serial ports for your progress messages. You need an adapter, and putty. If you’ve never done that, ask.

When the Ard program is reliable, then connect the Processing program. When that is working well, change the connection to via Bluetooth.

1 Like