I’m using this Arduino code (modified to have the LED on the LEFT_PWM) to try and control an LED. Using this code, the LED is in a perpetual ON state. Here is an example serial out from the Arduino:
lighti,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,_! Saving LED Setpoints Echoing New LED Command lighte,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,end Waiting for OK to execute... Reading Vial:6 String Completed, stop averaging 549 lighte,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,endlighta,,,,,,,,,,,,,,,,,_! Command Executed!
It seems that the off command is executed just fine, but to no effect. I am able to change the set values via the server_test.py script, also with no effect.
lighti,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,_! Saving LED Setpoints Echoing New LED Command lighte,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,end Waiting for OK to execute... Reading Vial:13 String Completed, stop averaging 596 lighte,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3000,3lighta,,,,,,,,,,,,,,,,,_! Command Executed!
Other Arduino scripts work as expected. This test script (also modified to go to the LEFT_PWM) turns the LED off and on at one second intervals, so we can rule out a hardware malfunction.
The stir script also works as expected (turns the LED on and off at quick intervals). Commands can be sent to the stir script to turn it off entirely, which then turns the LED off. I also modified the stir script to have the address “light”, which allowed it to be controlled via “light” commands.
Really don’t know enough about the Arduino Code that I’m using to control LED to understand what’s going wrong, though I did try messing around with it.
Any help much appreciated!! Thanks.