Help with code

7 posts / 0 new
Last post
pinkpanda3310
pinkpanda3310's picture
Offline
Last seen: 3 days 8 min ago
Joined: 12/28/2013 - 08:45
Posts: 1232
Location: Perth
Help with code

I got this idea to mod a light with a neopixel ring. I bought an Adafruit 3.3v trinket. I really only attempted this because it has a mini usb plug for programming, I wouldn’t have bothered otherwise. I thought it would be easy enough for me to learn something but honestly I’m not bright enough to go through the long process of learning, I just wanna jump to the good stuff (relevant to my build).

I went through the process on Adafruit and got blink mode working and also switch for the onboard led, I even got the code for the goggles working. The problem is that’s all cut and paste so I wasn’t really learning anything.

The code I wanted to use for my light was this but it didn’t work. I went back and halved the clock speed and tried to alter the code here or there but no dice, I simply haven’t learnt enough to make it work Crying

… soo I’d really like to get that last code working, any help from you guys that know code would be appreciated Smile

MRsDNF
MRsDNF's picture
Offline
Last seen: 8 hours 39 min ago
Joined: 12/22/2011 - 21:18
Posts: 11146
Location: A light beam away from the missus in the land of Aus.

I wish I could help but you have achieved more than I could have. Good luck.

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.

 

amplificus
amplificus's picture
Offline
Last seen: 17 hours 14 min ago
Joined: 12/10/2015 - 10:58
Posts: 52
Location: SoCal

Could you show how you wired it up and what code/errors you are getting? That might help debug.

pinkpanda3310
pinkpanda3310's picture
Offline
Last seen: 3 days 8 min ago
Joined: 12/28/2013 - 08:45
Posts: 1232
Location: Perth

It’s a bit finicky programming the trinket. It only stays in bootloader for several seconds but the Arduino IDE takes longer to compile and upload the code. So I have to try and guess the best time to enter the trinket into bootloader mode. When I get it right, no errors show up, it says ‘Upload finished’. Wiring is, of course, as per the wiring diagram, though I have noticed the photograph shows a different wiring setup. I have not tried the alternate wiring setup since I figured that was his prototype build and no longer relevant.

When I connect a battery the onboard leds come on indicating power on but the pixel ring is off and stays off when the buttons are pressed. I checked the buttons with DMM and even removed them to eliminate that possibility.

pinkpanda3310
pinkpanda3310's picture
Offline
Last seen: 3 days 8 min ago
Joined: 12/28/2013 - 08:45
Posts: 1232
Location: Perth

Bump

pinkpanda3310
pinkpanda3310's picture
Offline
Last seen: 3 days 8 min ago
Joined: 12/28/2013 - 08:45
Posts: 1232
Location: Perth

I got help at the adafruit forum so this project is back on track. I need to make up some extra switches on the body and then stuff it full of electronics Cool

MRsDNF
MRsDNF's picture
Offline
Last seen: 8 hours 39 min ago
Joined: 12/22/2011 - 21:18
Posts: 11146
Location: A light beam away from the missus in the land of Aus.

Good luck.

My current and or voltage measurements are only relevent to anything that I measure.

Budget light hobby proudly sponsored by my Mastercard and unknowingly paid for by a hard working wife. 

djozz said "it came with chinese lettering that is chinese to me".

old4570 said "I'm not an expert , so don't suffer from any such technical restrictions".

Old-Lumens. Highly admired and cherished member of Budget Light Forum. 11.5.2011 - 20.12.16. RIP.