-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino Serial Command #75
Comments
Interesting. For other reasons I just ended up at what is pointed from Stephen's site as 'an alternative': This one has 'setDefaultHandler'! So this must be the one that you are pointing to/including. I just tried that... and it worked without error or orange text! |
Glad you worked this one out! V1.0 of the GUI requires V1.0 of the arduino code, where we are not using the serial library you mention (as far as I remember)... Just in case the communication between the two boards do not work... |
Aha. Ok that is good to know in case I need that in the future. Thanks! |
Hi,
It's me again. I know you are very busy so don't want to create too many 'issues'. I am solving things where I can (and learning a lot). I came across a new issue that I think I know how to get around but am not sure. At some point, I can learn how to propose/contribute edits via git (I have never done that before and have not been good at following branching protocol, etc in my life; but want to).
Today I am trying to get the Arduino code going so that the Rpi GUI can communicate. (Yesterday I got GUI_1.0 working on my Rpi but only with the camera module). Today I learned how to communicate with Arduino via Python and serial! (I was learning using pyfirmata). So I think I am understanding the premise behind the FlyPi communication setup between the Rpi and the PCB/Nano.
So from what I understand currently, you have written arduino code that sets it up to receive commands via python directly (analagous to the pyfirmata 'standard' script that I was loading earlier today onto my nano to control via python). I am working with the most recent script found in the v2 folder called 'serial_test'.
I solved some Library import issues with the adafruit packages by adding via zip downloaded from git directly and found Stephen Cogswell's 'SerialCommand.h' at
https://github.com/scogswell/ArduinoSerialCommand/blob/master/SerialCommand.h, which I used to 'add library via zip'
.The #include works for this, but it seems like one of the modules called in your arduino script is not (no longer?) a part of their library.
ArduinoIDE check fails on:
sCmd.setDefaultHandler(unrecognized); // Handler for command that isn't matched (says "What?")
Looking at Stephen's code, it seems like the command might have changed to 'addDefaultHandler'?
void addDefaultHandler(void (*function)()); // A handler to call when no valid command received.
I edited the Arduino code for addDefaultHandler for now.
When I did this, the IDE compilation completed.
BUT I do get the following orange text:
Let me know if you think this is an error that I am missing a step somewhere or have the wrong library.
The text was updated successfully, but these errors were encountered: