controlling the full-color led
Is it possible to control the full-color led on an omega 2s+ pro using python? I want to create if else statements changing the color for different scenarios.
@Antony Check to docs here:
You just need to write the require codes to the device file, this is very easy to do thanks to the great work by @luz on the ledchain system.
Thank you @crispyoz !
I need python functions but https://onion.io/omega2-pro-get-started/#fullcolorled appears to not work with python, am I wrong? I tried with python and did not work.
@Antony The language you use is not relevant, you are simply writing to a file, I suspect your code returning an error writing to the file, what response codes is your code reporting for the file open and write functions?
language you use is not relevant, you are simply writing to a file, I suspect your code returning an error writing to the file, what response codes is your code reporting for the file open and write functions?
@crispyoz I am using python on the onion os, so its not telling me if I have errors in the code. Is there a way to debug easier? I know the code works when wiring a breadboard and led lights to the omega onion.
If I want the LED color on the Full-color LED turn blue on python do I just type: echo -en '\x00\xff\x00' > /dev/ledchain2 instead of something like gpio1.setvalue(1) as I would need to do for external LED lights?
Its also confusing because python also requires a "from" and "import" commands. But the document given by onion does not have this. It only has omega2-ctrl gpiomux set uart2 pwm23 to initialize the command in terminal.
Thanks again I very much appreciate your help!
@Antony Please post your code here.
Thanks for sharing such a helpful instruction, really appreciate for your article.