I have followed the instructions from the first two sources. I created the script that it stated and made sure that it was in the $PATH. I used the exact this exact terminal command: arduino-headless --upload --board arduino:avr:uno --port /dev/ttyACM0 -v ~/sketchbook/libraries/Adafruit_Neopixel/simple/simple.ino
When I punch in this command all it does is hang. The ring doesn't do anything. I have to hit ctrl+c to exit which I expect because of the script.
In addition, I tried another method that I got from source number 3 and installed the Arduino-mk and that results in the compile error when calling other functions.
I really appreciate any help that anyone can give.
Robin2:
Why not upload the program to the Arduino with a regular PC?
...R
+1
You don't need the Arduino IDE to communicate with the Arduino. You can just write the code for the Neopixelsl on a normal computer, compile it, upload it to the Arduino, and then connect it to the RPi.
You can then use a python script (or whatever language you're using) to communicate with the Arduino over serial. (Either using the USB connection or using the RPi's hardware UART, but keep in mind that it runs at 3.3V and the Arduino at 5V ...)
zerocool90:
When I punch in this command all it does is hang.
You don't get any console output at all from arduino after running the command?
Maybe it's this:
If the script does not return to a shell prompt, the options you specified were wrong and the Arduino IDE actually opened a window, stop its execution with Ctrl+C.
Robin2: The problem with that is there are multiple sketches that need to be compiled and upload. Ultimately, I'm trying to run these sketches from a gem in Ruby. That can have various dancing light patterns at the press of a button.
pert:
You don't get any console output at all from arduino after running the command?
I get nothing.
The only thing that I can think that would be wrong for that command is that I am not specifying that it is an R3 instead of a regular uno.
zerocool90:
Robin2: The problem with that is there are multiple sketches that need to be compiled and upload. Ultimately, I'm trying to run these sketches from a gem in Ruby. That can have various dancing light patterns at the press of a button.
I have used Ruby - I like it.
Wouldn't it be easier to have a single program running on the Arduino and use Ruby to send data to it for the different patterns. That way there would be no need to use the Arduino IDE. And it would implement the changes more quickly than if you have to upload a whole program.
I have been using Python for the past while because people who use Arduinos are more familiar with it. I have a Python program to compile and upload my programs using the IDE command line. The same thing could be done in Ruby - probably would not need much modification of my program.
zerocool90:
I get nothing.
The only thing that I can think that would be wrong for that command is that I am not specifying that it is an R3 instead of a regular uno.
No, your fqbn is correct. Here you can see a successful build from command line using it:
the Travis CI build is similar to your arduino-headless script in that it also uses Xvfb. I still suspect that it's trying to open the GUI for some reason. I have been having problems with the command hanging or failing without providing me with an error message but I always get at least part of the:
Picked up JAVA_TOOL_OPTIONS:
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
type of output.
Try doing a verification to see if it's an issue specific to uploading.
If there's any way you can connect a screen and mouse to your Pi I'd give the Arduino IDE GUI a try on there just as a sanity check. If you know you can do an upload using the GUI with the same settings (including port) then that gives you some information to work with.
I agree with Robin that it is better to have a single sketch running on the Arduino to control your lights but it's still useful to be able to do an upload to the Uno via SSH whenever you want to make some changes to that sketch instead of having to disconnect the Arduino from the Pi and plug it into a different computer.
Robin2: I glanced over your program. It looks interesting and I might question you further on it, if that is ok with you. It seems a little over my head, but I will see if my professor can help me grasp the code.
pert: I definitely know that those sketches will upload using the Arduino GUI. Believe me this project has been testing my patience. I have been working on this issue for 3 weeks now.
Grumpy_Mike: That's true. I thought that using the Uno would be the easiest way of doing this project, but I guess that notion went down the tubes. That being said I looked up more about that and ordered the 74AHCT125 chip so I can test that method as well.