Chainable LEDs[SOLVED]

Oops Zlatan,

I am not following here.
DI update?

Sorry for the inconvenience, but I am not familiar with this…

vriendelijke groeten,

Freddy

Hi Karan

Sorry for misspelling your name.
I am using a standard Raspbian so DI update is not available.

Sorry for the trouble.

vriendelijke groeten,

Freddy

Hi Karan,

Probably I need to upgrade to Raspbian for Robots to continue.
Is this possible without loosing my settings?
I found something at https://github.com/DexterInd/Raspbian_For_Robots/tree/master/jessie_update

Can I trust this as it states that it is for developers…

Some recommendations are welcome as I have shared folders, wifi, Vnc etc. installed.

Regards

Freddy

@cluckers,
Yeah the updates would lead to loosing files and settings. Can you try this out to download just the examples and see if they work.

Make a folder called temp on the desktop:

mkdir temp

Goto that folder:

cd temp

Download the two updated files for the RGB LED:

wget https://raw.githubusercontent.com/DexterInd/GrovePi/master/Software/Python/grove_chainable_rgb_led/direct_serial_lib/chainable_rgb_direct.py
wget https://raw.githubusercontent.com/DexterInd/GrovePi/master/Software/Python/grove_chainable_rgb_led/direct_serial_lib/chainable_rgb_direct_example.py


Run the example and see if it works. (The LED’s need to be connected to RPISER port)

Hi Karan,

First test are looking good.
Using the serial port for this seems to be more logical.
In your example there is an easy way to set the color of the first led in the chain.
Is there a similar command for the only second and the third for instance?
I would like to turn colour on/off for individual leds.
If I need to use each time a full array, so be it but then I need to store values each time.

I also purchased a new sd card and installed raspbian for robots on it.
However, it looks like I am unable to install the full vnc server as I am used to.
I am able to connect to the system but vnc is not the same and restricted.

I now am using my old jessie again and the leds are working.
I will implement them now in a full system with other sensors.

Kind regards,
Freddy

@cluckers,
Great to hear that this method is working better for you.

I just updated the example and now you can control one LED without having to change the entire array. It should be up on github. Can you do the same steps as before and download and try it out and see if it works for you.

Can you explain a little more about the new Jessie image. Which image did you try burning and what was restricted. Can you share a few screenshots too.

Hi Karan,

Maybe I miss something here.
From what I can see it is still the same example as 4 days ago.

Kind regards,
Freddy

Hi Karan,

Concerning ‘Raspbian for Robots’, I downloaded the following image: 2017.01.22_Dexter_Industries_jessie.rar
I burned a boot on an SD card and started the raspberry pi.
I configured the Wifi directly from the system as I have a screen and keyboard connected to it (just for initial configuration).
I then looked at the IP address and tried on a network PC to connect using VNC.
It failed but when I added a ‘:1’ after the IP address I was able to connect to the system.
However, this will start a complete new session so the display on the rasp direct and the one used by VNC are different.
I tried to start the normal VNC using the ‘Raspberry Pi Configuration’ where it is stated that VNC is not started, but this is not working even though I was able to select it, but it is removed when I leave the configuration window.

I now have the leds running with your new programming and with additional sensors and at first look they function OK.
I created a function to modify the led array only for one led, but will change that to the example that you will provide, when it becomes available.
Using this port seems to be a much better idea and makes more sense to me, so hopefully this will continue to work.

Many thanks,

Freddy

Hi Karan,

I now could find the new example.
However, it gives me the following error:

Traceback (most recent call last):
** File “chainable_rgb_direct_example.py.1”, line 81, in **
** l.setOneLED(127,127,0,0) #Set LED 0**
AttributeError: rgb_led instance has no attribute ‘setOneLED’

------------------
(program exited with code: 1)
Press return to continue

Kind regards,

Freddy

@cluckers,
Did you download the updated library for the LED too. It is here and it has the new function

Hi Karan,

I did, but the file was not overwritten.
It added '.1. behind it, so the old file was used.
Sorry, my mistake.

It seems to work very well for all the tests I did today.
Many thanks,

Freddy

@cluckers,
Great to hear that it is working for you. Do keep us posted on your project. Are all the 20 LED;s working properly.

Hi Karan,

There seems to be some confusion.
In my project I only use 4 LEDs.
However I tested it with 10 LEDs and it seems to work fine.
With 4 LEDs so far, I detected no errors.
So for me it looks like the problem is solved.

Thanks,

Freddy

@cluckers,
Great to hear that. I’ll go ahead and reorganize the chainalble RGB LED folder on github too. Thanks for your patience and thanks for testing the LED.