Enabling full control of LED's

I should also mention that I added some direct download links to avoid the issue with people getting the HTMLized version of the scripts. :)
 
  • Like
Reactions: carpy
And your default is exactly what I was going to make my default! Yay for less buttons to push now!

The chmod a+x led_control.py to avoid having to prefix everything with python doesn't seem to work though. I still have to prefix everything with python.
 
And your default is exactly what I was going to make my default! Yay for less buttons to push now!

The chmod a+x led_control.py to avoid having to prefix everything with python doesn't seem to work though. I still have to prefix everything with python.

Try '#!/usr/bin/env python' at the top of led_control.py instead of '#!/usr/bin/python'.
 
wow this is pretty cool, nice job.
That new command execute in solex is killer. I'm trying to figure out how to trigger scripts from a tananis on my DIY. Missing something
 
Try '#!/usr/bin/env python' at the top of led_control.py instead of '#!/usr/bin/python'.
That didn't work either. I also verified the files do actually have the execute permission set. Am I the only one having this problem?
 
@human is on the case. In the meantime, I'm loving the start up script. I just does what I want without me having to push buttons first. One step closer to being self aware.
 
I've re-worked the install process to make it much simpler. Now it's just a two step process: copy the installation script and zip file to your Solo, and run the install script.

The script takes care of the firmware upgrade, installing the command line utility, and (by default) sets the LED colors on bootup.
 
Forgot to mention... If you're using the new install script, it probably wouldn't hurt to delete any of the other (older) versions of files that you've transfered to your Solo.
 
Ran the new install method. Well done! A few things may still need to be cleaned up:
  • Running ./led_control_install.py wouldn't execute until I changed the permissions to execute. Perhaps it would work with a preceding python? Or can you set those permissions in advance?
  • I would update the install instructions to specify putting the files in /home/root/ unless it doesn't matter? Otherwise people will just drop it right in the root root.
  • Solex can't seem to see the files in the new directory. I can execute via an SSH terminal just fine with no preceding python or ./. But from Solex, it doesn't see them and just does nothing. If I put a copy of the two files back in /home/root/, solex can execute them with the preceding python. Not sure if this is a solex matter or something you can address.
 
Ran the new install method. Well done! A few things may still need to be cleaned up:
  • Running ./led_control_install.py wouldn't execute until I changed the permissions to execute. Perhaps it would work with a preceding python? Or can you set those permissions in advance?
  • I would update the install instructions to specify putting the files in /home/root/ unless it doesn't matter? Otherwise people will just drop it right in the root root.
  • Solex can't seem to see the files in the new directory. I can execute via an SSH terminal just fine with no preceding python or ./. But from Solex, it doesn't see them and just does nothing. If I put a copy of the two files back in /home/root/, solex can execute them with the preceding python. Not sure if this is a solex matter or something you can address.
Ran the new install method. Well done! A few things may still need to be cleaned up:
  • Running ./led_control_install.py wouldn't execute until I changed the permissions to execute. Perhaps it would work with a preceding python? Or can you set those permissions in advance?
  • I would update the install instructions to specify putting the files in /home/root/ unless it doesn't matter? Otherwise people will just drop it right in the root root.
  • Solex can't seem to see the files in the new directory. I can execute via an SSH terminal just fine with no preceding python or ./. But from Solex, it doesn't see them and just does nothing. If I put a copy of the two files back in /home/root/, solex can execute them with the preceding python. Not sure if this is a solex matter or something you can address.

The install script is actually a shell script, not a Python script. So, you can do the chmod a+x thing, or run it like this:

sh ./led_control_install.sh

(That's actually correct in the doc , for once )

The script will run from anywhere. It unpacks everything into a temp directory first, and then copies from there.

I'll look at the Solex issue. I wonder if Solex does something to override the default PATH..
 
Nice job @human

I like the new LED scheme at startup COOL friggen beans!,
one thing I did notice "Lets say you disconnect the controller from the solo" what happens is the LED's do not indicate this by flashing the normal pulsating red "warning" of a disconnect, they just remain at the scheme selected... is this by design? One more thing I have no control of commands on SOLEX only if I use Putty to SSH,, Please advise.. and thanks for the hard work.
 
Something is up with the way Solex is communicating the commands to the solo. Solex for some reason isn't seeing the scripts in the new folder that they're in. As you noticed too, it works via any other SSH. Just not Solex. As a work around until Kelly addresses that issue, you can put a copy of the two py files in /home/root/ and Solex commands will work off of those.

It would indeed seem that when you override the stock LED mode, it does inhibit all stock LED functions including the lost signal blinking. I'm OK with that though.
 
Something is up with the way Solex is communicating the commands to the solo. Solex for some reason isn't seeing the scripts in the new folder that they're in. As you noticed too, it works via any other SSH. Just not Solex. As a work around until Kelly addresses that issue, you can put a copy of the two py files in /home/root/ and Solex commands will work off of those.

It would indeed seem that when you override the stock LED mode, it does inhibit all stock LED functions including the lost signal blinking. I'm OK with that though.

I am too, you can always reset the leds in solex to stock settings on the fly and the led's will then return to stock functions Thanks for the reply.
 
Nice job @human

I like the new LED scheme at startup COOL friggen beans!,
one thing I did notice "Lets say you disconnect the controller from the solo" what happens is the LED's do not indicate this by flashing the normal pulsating red "warning" of a disconnect, they just remain at the scheme selected... is this by design? One more thing I have no control of commands on SOLEX only if I use Putty to SSH,, Please advise.. and thanks for the hard work.

Thanks!

Yes, any settings you specify override the LEDs at all times, including when the loss signal occurs. I actually don't like that, but that's the way it was implemented in ArduCopter, and I didn't change it. Now that I've got a little more familiarity with the code, I'll probably change it so that the overrides only take place during normal flight.

I believe I've fixed the Solex problem in the latest release. Go ahead and download and install it, and see if that fixes the problem.

The download / install is now only one file, as I've embedded everything (including the firmware) inside a single install script.
 
human,
Good work.
I've developed a stand alone Android app that will control the LEDs. It started out only using the 1.3.1 version and could only do the macro based stuff, but with your mods to oreoled, it can now do a lot more. I haven't added the phase offset, period and amplitude yet.
I've noticed that the Solo can sometimes loose sync and the patterns don't always look the same. Maybe this is due to timing as to when I send the commands and some of it persists from one setup to the next. I also have not figured out what FADEOUT does.
I also added motor tests so it can spin up each motor. Not much control in the GUI yet, but the whole project is a WIP, and there is a lot of unused code from other projects lurking in the sources.
It talks directly to the Solo, no Solo app, no python or Solex needed. The commands take effect instantly when you push the "Engage" button.
If you or anyone else wants a copy of the .apk PM me and I'll e-mail it. File size is > 3Mbytes and you will have to side load it.
Sources will be available when it has more features implemented.
Attached is the README.
 

Attachments

  • README.txt
    7.7 KB · Views: 16
Last edited:
  • Like
Reactions: human
3DR's flash patterns do leave a bit to be desired. As I think we've all noticed, FadeOut does nothing. The rest work, but they don't seem to do what their name implies. FadeIn seems to be more of a blink once in a while. Strobe looks nothing like a strobe. And Siren is the closest thing to a strobe but is still too slow IMO. I've found that of all the patterns available, Siren is the only one that's remotely useful. Some day, it would be cool to have new custom made ones that are more practical.
 

New Posts

Members online

No members online now.

Forum statistics

Threads
13,094
Messages
147,748
Members
16,058
Latest member
Gabriela