I am trying to get the neopixel sevice to work. I am using Gael's InMoov3Deep.AB.py script and uncomenting his neopixel code.
#neopixel = Runtime.createAndStart("neopixel","Serial")
#neopixel.connect("COM3", 57600, 8, 1, 0)
The scripts in his gestures directory call the neopixel function like this
neopixel.write(3)
I can not get this to work. I have a seperate arduino micro that runs the stomach neopixel and I have loaded the script that gale has on his site for it but it appear to be the basic test code that comes from Adafruit with nothing inmoov specific.
https://inmoov.fr/neopixel-ring-arduino-code-for-stomach/
Should I be running this code on the arduino or should it be an instance of MRLcomm?
I do not understand how MRL and python transfer the command to change the lighting sequence via the gestures py scripts.
Anybody using this and can offer some help?
Perry
NeoPixel
Hi Perry
Since you have a separate Arduino, the best alternative is to install MRLComm in it and then use the NeoPixel service. You can find example code here:
http://myrobotlab.org/service/NeoPixel
I don't think Gael is using the NeoPixel service in his script yet. I remember he wrote that he just used a free running Arduino without any connection to MRL.
The NeoPixel service was created a few monts ago by calamity. I think he will be happy to see someone starting to use it and give some feedback on how it works.
/Mats
Hello Perry, This code is a
Hello Perry,
This code is a simple arduino sketch to run a loop light effect on your Neo Ring:
https://inmoov.fr/neopixel-ring-arduino-code-for-stomach/
If you want to use the serial service like I do:
1-You need to upload this sketch into your Arduino that controls the Neo Pixel ring:
https://github.com/MyRobotLab/pyrobotlab/blob/master/home/moz4r/INO/Neopixel_MRL.ino
2-The Arduino has to be connected via USB to your PC.
3-You need to uncomment these lines and modify the COM port, pin number, and the bytes per second on your Arduino:
neopixel = Runtime.createAndStart("neopixel","Serial")
neopixel.connect("COM3", 57600, 3, 1, 0)
4-Connect your Neo ring to pin 3 on Arduino. (I had changed mine to pin 8)
5-Uncomment in the gestures
neopixel.write(3)
6-When the gesture is called the Neo ring should start to activate.
7-Look into the Arduinosketch to see the various states of light that correspond to .write(3)
You can find more info of moz4r here:
https://github.com/MyRobotLab/pyrobotlab/blob/master/home/moz4r/Neopixel_Serial.py
Thanks a bunch Gael. That is
Thanks a bunch Gael. That is very helpful and I appreciate you taking the time to respond. I knw you are busy.
I have been thinking about a way to convey eotions with my inmoov. I have a couple neopixels in it. Maybe a redish color in the head when he is getting "angry" a blue when he is happy. More cross armed gestures and quick movements could indicate agitation. It would be neat if there could be a counter in the aiml that represents emotional state. For instance too many default responses because he doesn't understand the question would anger him and increment the mood. Like a scale of 1 to 10.
But that is another conversatiion.
Thanks again for the explanation.
Perry
Hi Perry As Mats point out, I
Hi Perry
As Mats point out, I made a neopixel service some times ago with the goal to control it easy from MRL without having to maintain a different arduino sketch anf messages
You can control the color or pattern of the led of the neopixel with a python, so it`s easy to setup with AIML file
there is also some pre-set pattern that run from the arduino, if you want different pattern, I will be happy to implement them
http://myrobotlab.org/service/NeoPixel
Thanks calamity. Iwill let
Thanks calamity. Iwill let you know if anything is needed to be added. I am going to play around with this for a couple of das to get my bearing.
Perry