LED Ring I2C device

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

@ Alex...
is done and tested... zip file here...
http://www.flypix.co.uk/shikra/ftp/

Minor Revised led.ino
to suit 2.1+ flags
added vbat into #define

New LEDring.ino
can compile in Arduino 1.0 to make easier going forward
instructions for making 1.0 suitable to use with the board
new feature - sat count indicator when motors off and gpshold/rth switch enabled. (I found surprisingly usefull...)
a few more led sequences
some tidy up

I'll do a vid at some point

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: LED Ring I2C device

Post by Alexinparis »

ok thanks,
I will integrate it soon
the vid will be welcomed :)

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

hi

will this one compatible to your code shikra?

http://www.dfrobot.com/index.php?route=product/product&product_id=487#.UBKo_2E0MUM

br michael

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Fairly sure its the same one. If not I'll happily amend the code.
I got my board from multiwiicopter.com, but I see its not listed at moment which usually means out of stock.

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

wow !! dfrobot ist fast!! very fast!! i ordert the led-ring device on sunday evening and it is now in frankfurt,germany in 2!!! days from shanghai :shock:

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: LED Ring I2C device

Post by Alexinparis »

It's now in the _shared branch + the standalone file + your README.txt

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

That's great. Thanks Alex
Sorry no vid - I recorded, but the camera doesn't show the led.ss. Need to try a different one.

ReM
Posts: 14
Joined: Sun Jul 08, 2012 12:02 pm
Location: Lithuania

Re: LED Ring I2C device

Post by ReM »

I tried this device (DIY). Works perfect.

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

hi

my device arrived today with the second attempt :)

the mounting holes are not standart (aprox. 1inch)

are there any pictures how to mount the led ring on a copter?

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: LED Ring I2C device

Post by cGiesen »

I got my device too.

But it's not usable. Why didn't think devolper about how to mount it to frames :(

ReM
Posts: 14
Joined: Sun Jul 08, 2012 12:02 pm
Location: Lithuania

Re: LED Ring I2C device

Post by ReM »

It is designed not a for MWC...

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: LED Ring I2C device

Post by cGiesen »

This is an MWC (MultiWii Copter?) forum?!?!?
So when some one post hardware here I expect that I can use it.

ReM
Posts: 14
Joined: Sun Jul 08, 2012 12:02 pm
Location: Lithuania

Re: LED Ring I2C device

Post by ReM »

Yes, you can use it. :) But the mounting holes are not MWC standard...

I make DIY LED RING.

Image

tovrin
Posts: 705
Joined: Tue Sep 20, 2011 4:08 pm

Re: LED Ring I2C device

Post by tovrin »

cGiesen, this is a MWC software forum, the software that makes it work is available, but being able to attach it to whatever frame you buy (since MWC is not hardware, nor frames) will be left up to you.

the product was originally designed for another purpose, and Alex was cool enough to re-purpose it. if you come up with a clever way of mounting it, please share.

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Hi guys - for mine I cut a liteply circle same as PARIS board, drilled standard mount holes to fit to frame and sprayedblack to look cool. Then foam taped the LEDring to the board.
ALso I soldered the i2c connector to underside of board to no wires on top. I just removed and sprayed the LEDring board black to see if I can make a video showing the LED colors better as my cam doesn't show how good it looks.

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

ReM - wow - thats a lot of effort. Well done. If you want any different LED configs to suit let me know - is LED0 one of center ones? That would be best for the layouts / mag

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: LED Ring I2C device

Post by cGiesen »

tovrin wrote:cGiesen, this is a MWC software forum, the software that makes it work is available, but being able to attach it to whatever frame you buy (since MWC is not hardware, nor frames) will be left up to you.

the product was originally designed for another purpose, and Alex was cool enough to re-purpose it. if you come up with a clever way of mounting it, please share.


Hi,
all FC and BOB have the same mounting.
Why? Say want to sell. If the mounting is different to all other, say must have boards for all different frames.
And a 'standard' is 45mm

But you are right is up to you, to ignore that.
I have buy my item. If you are a europe company I would resent it and get my money back!
So I put it only to my archive.

cu
Carsten

ReM
Posts: 14
Joined: Sun Jul 08, 2012 12:02 pm
Location: Lithuania

Re: LED Ring I2C device

Post by ReM »

shikra wrote:ReM - wow - thats a lot of effort. Well done. If you want any different LED configs to suit let me know - is LED0 one of center ones? That would be best for the layouts / mag


Yes, the blue led indicates the correct direction. :) I changed the RTH and POSHOLD LED sequences - blue leds not good visible in flight...

CrazyJ
Posts: 2
Joined: Tue Aug 14, 2012 1:51 am

Re: LED Ring I2C device

Post by CrazyJ »

Got a question for anyone that might know! I have one of these LED rings (think it's a V3 - don't know how to tell)! Anyways, I was able to reflash it just fine and installed the 2.1 MultiWii code with the updated LED.ino on my Paris v.4. In the MultiWii code the LED Ring is defined. Now, I thought all the pieces and code, etc were correct but I don't get anything lights :(

I know the wiring is correct - is there anything else I should look out for?

Thanks!
Jason

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Any lights at all? On the latest one the default should be a circling red led on white - waiting I2C comms

how about uncomment this one...
//#define LED_RING


I put some instructions in zip file... Drop me a mail if still stuck
Attachments
README.zip
(2.31 KiB) Downloaded 193 times

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

hi

i just getting errors trying to upload the led-code to the device.

after modifying the boards.txt file it works....

Code: Select all

##############################################################

lilypado.name=MultiWiiCopter LED Ring v3
lilypado.upload.protocol=arduino
lilypado.upload.maximum_size=14336
lilypado.upload.speed=115200
lilypado.bootloader.path=optiboot
lilypado.bootloader.file=optiboot_atmega168.hex
lilypado.build.mcu=atmega168
lilypado.build.f_cpu=8000000L
lilypado.build.core=arduino
lilypado.build.variant=standard

##############################################################


i added the lilypado.bootloader..... terms!

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

hi

i now attached the device to my copter on the bottom side.
in flight i can see the leds much better :)

it is possible to change the direction off the mag indicator?
dont know atm what else should be changed if the device is mounted upside down.

thanx
michael

cGiesen
Posts: 188
Joined: Wed Jul 18, 2012 7:53 am
Location: Bochum, Germany

Re: LED Ring I2C device

Post by cGiesen »

mbrak wrote:hi
i now attached the device to my copter on the bottom side.


Can I have a picture please?

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

hi

here they are :)

Foto1.JPG


Foto2.JPG


Foto3.JPG

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Try changing
param[5]=90-param[5];
to
param[5]=90+param[5];
in LEDRIng.ino


I think should work from quick look.

Nice on the underside. I have not tried but wondered if it possible to run 2 * I2C in read only on same bus. Have to google...
For me I just like it for bling!! Although the sats indicator is brill. I really like that.

I'll add a config option in future release to reverse direction if needed.

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: LED Ring I2C device

Post by Katch »

Here's mine mounted on my MWC X250

Image

User avatar
mbrak
Posts: 136
Joined: Sat Dec 03, 2011 8:08 pm
Location: Germany, Lemgo

Re: LED Ring I2C device

Post by mbrak »

look cool :)

i think mounting it upside down on the bottom was the right way!
in flight you could see the different modes very well!

on top is the gps antenna. no space for a led ring device :)

thanks shikra for the code. will test it tomorrow! great code !!!

what did you mean with 2 devices in read mode? the led-ring and the oled? working very well together! no problems!

br michael

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Sorry - was not clear.
What I mean was 2 LEDring devices - one on top and one on bottom. Both read I2C devices so I think can co-exist. Just never needed to find out :)

I'll try one underneath soon enough - it's not suited my copters / flying style, but I have a new one which will suit...

rizky_p
Posts: 14
Joined: Thu Sep 06, 2012 3:57 pm

Re: LED Ring I2C device

Post by rizky_p »

This is the best multiwii bling ever, i find the satellites lock indicator/count really usefull. I just got this LED ring to work first time, easy enough for noobs like me. Any further development shikra?

Regards
Rizki

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Yeah - its worth it just for the sats counter on its own. I think maybe that will make it more popular.
Great to hear the feedback too - I received same by PM from someone else who just added their GPS.
I think you are only one of a few that have tried with GPS. It's really cool to watch the LED go through the routines..... Best bit.


Anyway for future...
- I set up googlceode /wiki for it yesterday ( mainly because I need to learn svn google process). Will be finished next week.
- It's ready for 2.2 dev releases to better work with new flags method snd provide indicator for Horizon mode + rejigged.
- Probably add a mag/baro indicator for GPS mode.
- pwm support - for non multiwii devices. Can connect to rx channel. Plavnes, naza, etc. etc.
- maybe a few more standalone led layouts / routines.
- see if can shrink the memory down a little, but key thing is want it to process fast, so not going to be doing anything complex

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

Just ordered this board, Im currently running 2.1 with gps. Is there anything i need to do to the board to get it to work, besides plugging it in and activating in the sketch?

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Yes - there are some basic instructions in the text file that comes with the code.
I am creating a wiki as mentioned. Should be done in the next week or so if work permits.

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

I tried to record on a video, but it came out rubbish. The bright LED's confuse the autoexposure on my recorder.
Real shame becaus eteh colours do look real cool.

I don't think its of great use in the air, but on the ground its a real usefull bit of kit for those that run GPS

Anyway, here is an animation. Marginally better than my crap recorded vid!....

http://www.youtube.com/watch?v=c0-WkhtR9_M

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

Which file do i need to upload to the board? I see on that page a few of them.
I assume this is the one your refering too.
http://www.flypix.co.uk/shikra/ftp/

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Its all in the ledring trunk....

in brief
1 file to upload to board.
1 file to replace the original ledring.ino
edit the config to enable ledring.

http://code.google.com/p/multiwii/sourc ... %2FLEDRing

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

Awesome thanks,

I've noticed on all the videos motors off, does it behave the same motors on. Guess ill find out soon, but was just wondering.

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Motors on
ACRO flying - MultiWiicopter Navigation lights / strobe
LEVEL flying - Static Red/Green. Position for orientation.
GPS position hold - Static all Blue
GPS RTH - Flashing all Blue
Battery level low - Fast flashing all Red

Motors off
Unstable position warning - Fast Green flash
Acc not calibrated - Fast Green flash
Acro mode with BARO/MAG disabled - cool MultiWiicopter Navi lights
Motors off - BARO/MAG enabled
ACRO mode - base color = RED
LEVEL/ANGLE mode - base color = GREEN
HORIZON mode - base color = every 2nd LED GREEN
If in LEVL/ANGLE/HORIZON mode:
IF MAG = North direction indicated by single Blue
IF BARO = flash every other blue

Motors off - GPS RTH/POSHOLD enabled
base color = WHITE
no sats = circling red LED (NOT ready to fly)
sats < 5 = flashing RED count of number of sats (NOT ready to fly)
sats 5 pr more = steady RED count of number of sats (ready to fly)

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

OK just got the board. How do I change the led ino in the sketch? Just copy and paste the whole code or is there an easier way.

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

Ok loaded the board and move the sketch over, No i have an error when trying to upload it to my quadrino board

It high lights this line in the main Multiwii_2_1
i2CLedRingState();

the bottom says 'i2cLedRingState' was not declared in this scope

So now im lost

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Hi Killab. Good timing - I have a set up a googlecode wiki to help with files and documentation. I think its just about ready. Would appreciate if you have a look to see if it helps.

http://code.google.com/p/ledring/

There is a wiki with some instructions too.

In brief, if using 2.1 there must be a file called led.ino in the sketch. It souds like its missing

Killab
Posts: 10
Joined: Sat Jun 16, 2012 5:42 pm

Re: LED Ring I2C device

Post by Killab »

Well for some reason the folder was not there, maybe i deleted it on accident, so all i did was download the file and then save it in the Multiwii 2.1 file with the other ino files. So i guess thats right.
But then i went to upload it it game me that error. It is defined in the sketch and there is a tab for the ledring.

So guess i will just download it again and try it again.

DexterIt
Posts: 3
Joined: Sat Jun 02, 2012 8:24 am

Re: LED Ring I2C device

Post by DexterIt »

Hi guys. I have a small problem.I use the 2.1 software and the Ledring V3(using AIO PRO v1.1 board and Ublox GPS).
Up to now i was using it with this defines:

Code: Select all

#define MultiWii_I2C_v1 // - to use standard Multiwii 2.0/2.1 LED functionality. 
#define LEDBOARDv3
#define I2C_address 0x6D

and the original LED.ino found in the 2.1 source.
Is working ok,showing the north with the blue led and the inclination with the red leds.
Now i wanted to upgrade to the alternate LED.ino and i get the I2C errors.
I defined for the ledring like this:

Code: Select all

#define MultiWii_I2C_v2 // - to use Multiwii 2.2rc LEDring functionality. (or 2.1 with alternative LEDring.ino
#define I2C_address 0x6D

and changed the LED.ino in the schetch with the alternative one and defined the same I2C address 0x6D.
It wont work even defining the I2C addresses to 0xDA in both boards.
Do i need to uncomment the

Code: Select all

//#define INTERNAL_I2C_PULLUPS

?

Thank you for the help and the good work!

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

download this file - should have correct replacement led.ino sketch. Also the matching ledring.ino
http://ledring.googlecode.com/files/LEDring_2_0.zip
and don't forget to enable in config.h !!

if you are using gps I think you will like!

DexterIt
Posts: 3
Joined: Sat Jun 02, 2012 8:24 am

Re: LED Ring I2C device

Post by DexterIt »

Thank you Shikra for the file,it works perfectly.My last concern is about finding what i need to activate for PH and for RTH options.For the PH i have ACC and BARO and MAG active,as for RTH i only have ACC and MAG active.Is this the correct way of activating things?
Thank you again!

robertha
Posts: 16
Joined: Sun Mar 17, 2013 10:12 pm

Re: LED Ring I2C device

Post by robertha »

Hi,

I have 2 (maybe stupid) questions regarding LEDRing:

- in LEDRing.ino is -
#define I2C_address 0x6D - as a LEDRing address, in contrary in Alarms.cpp is - #define LED_RING_ADDRESS 0xDA

-in LEDRing.ino is - as
int16_t param[10]; //* Parameters passed from Multiwii */, in Alarms.cpp is - uint8_t b[10]; - for same set of parameters

How this supposed to work ? Should not be both equal ?

Robert

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: LED Ring I2C device

Post by shikra »

Partly my error - it was during move from 8 bit to correct 7 bit address for I2C communication and I used older implementation.

It works fine.. :)

I didnt think anyone would notice so never changed. Has been like it for a few release now!

robertha
Posts: 16
Joined: Sun Mar 17, 2013 10:12 pm

Re: LED Ring I2C device

Post by robertha »

Thank you for quick reply Shikra.
I understand the address 8-7 bit change, but how could work int16_t parrams array in LEDRing.ino when we send uint8_t from multiwii is beyond my imagination.
I am asking because I trying to make a small device with one RGB led and ATTiny to signal MWii status but strugling with I2C comms - so digging in LEDRing code a bit.

Robert

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: LED Ring I2C device

Post by haydent »

i could not compile without making the boards.txt bit like this instead:

Code: Select all

lilypado.build.core=arduino:arduino
lilypado.build.variant=arduino:standard

Post Reply