Hello again. I'm building a DMX512 lighting device using an Arduino Uno and NeoPixels. It includes a cheap RS485 to serial interface and a library from Conceptinetics. The prototype works perfectly, NeoPixels respond nimbly to DMX commands and I'm chuffed. Now I'm trying to migrate the code to something more compact, a Pro Trinket 5V, because I love Pro Trinkets and the circuit loves the 5V, but all is not well.
The code compiles (ver. 1.8.8) and uploads without errors, but doesn't respond to the DMX data. My attention falls on the Conceptinetics library. Is it managing serial data in a Pro Trinket appropriate way? I rarely venture outside Adafruit's Arduinoverse, so I don't know how much compatibility to expect from other people's code on Adafruit hardware. I glanced at the .cpp file, and the tiny bit that didn't fly over my head just looked like instructions for receiving serial data and processing it. Is there content in there that won't work on Pro Trinket architecture? Should I obtain a Metro Mini instead? What clues should I look for in similar future situations?
(Note: This isn't a Pro Trinket deprecation issue. It and my legacy laptops are fast friends, and it's running strandtest flawlessly right now. I'll always love Pro Trinkets, but I know they're not always the perfect fit.)
Thanks for the help.
Hallelujah!
Disciple
Other Arduino libraries on a Pro Trinket?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 14165
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Other Arduino libraries on a Pro Trinket?
Disciple,
If really must stick with a 5v chip the Metro Mini could be a good choice or the ItsyBitsy 32u4.
https://www.adafruit.com/product/2590
https://www.adafruit.com/product/3677
We have plenty of logic level shifters if you wanted to use any modern boards M0/M4/etc. which would give you a ton of memory, flash and clock speed.
If really must stick with a 5v chip the Metro Mini could be a good choice or the ItsyBitsy 32u4.
https://www.adafruit.com/product/2590
https://www.adafruit.com/product/3677
We have plenty of logic level shifters if you wanted to use any modern boards M0/M4/etc. which would give you a ton of memory, flash and clock speed.
- Disciple
- Posts: 852
- Joined: Tue Jan 06, 2015 8:13 pm
Re: Other Arduino libraries on a Pro Trinket?
Thanks for replying.mikeysklar wrote:If really must stick with a 5v chip the Metro Mini could be a good choice or the ItsyBitsy 32u4.
https://www.adafruit.com/product/2590
https://www.adafruit.com/product/3677
I very much want to stick with a smaller controller that will replace the Uno in my 5V circuit, but now I'm puzzled. Rereading the Pro Trinket page reminded me that both boards are built on the ATmega328, so why does the sketch and library work on the Uno but not on the Pro Trinket? What's lacking, the CP2014? The Optiboot? Will the Metro Mini have the same problem? Is there a way to find out before buying?
I'll build my design around the Uno if I have to, but I'd sure prefer to use something small that can pop into a socket, if I can find it. Whatever you can tell me is thoroughly appreciated.
Hallelujah!
Disciple
- mikeysklar
- Posts: 14165
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Other Arduino libraries on a Pro Trinket?
Disciple,
When you run the code on the Trinket Pro can you sprinkle in some Serial.print() statements so you can determine what is going on with the DMX code? Since your code uploads without issue and you are using the 328 processor I suspect is going to be that of pin number differences between the Uno and Trinket Pro.
When you run the code on the Trinket Pro can you sprinkle in some Serial.print() statements so you can determine what is going on with the DMX code? Since your code uploads without issue and you are using the 328 processor I suspect is going to be that of pin number differences between the Uno and Trinket Pro.
- Disciple
- Posts: 852
- Joined: Tue Jan 06, 2015 8:13 pm
Re: Other Arduino libraries on a Pro Trinket?
Well, I do have a CP2014 Friend I could try, but the Conceptinetics library is all about managing serial communication between remote control lights. Will the two conflict? Will I be able to tell if they do? Guess I'll try 'em and see.mikeysklar wrote:When you run the code on the Trinket Pro can you sprinkle in some Serial.print() statements so you can determine what is going on with the DMX code?
Hallelujah!
Disciple
- Disciple
- Posts: 852
- Joined: Tue Jan 06, 2015 8:13 pm
Re: Other Arduino libraries on a Pro Trinket?
Okay. Good news.
My Metro Mini arrived and it's running my DMX device sketch without a hitch. Compact circuit, here I come. My takeaway is this... when coding for Adafruit hardware, stick with Adafruit libraries.
That said, the Conceptinetics library is doing a bang-up job of receiving DMX data, (haven't tried transmitting yet). Now, I wouldn't know the first step in trying to adapt it to SAMD Feathers or RP2040s, but I can imagine a goodly number of uses if it could be done... mostly in the performing arts and public display realms. (Maybe the ESP32 code for SparkFun's shield, product 15110, is a starting point?)
Next step is building the physical bits of the project, which may not happen until June, and this topic may lock by then. If it does, I'll show WIPs in a new thread. Thanks for the input.
Hallelujah!
Disciple
My Metro Mini arrived and it's running my DMX device sketch without a hitch. Compact circuit, here I come. My takeaway is this... when coding for Adafruit hardware, stick with Adafruit libraries.
That said, the Conceptinetics library is doing a bang-up job of receiving DMX data, (haven't tried transmitting yet). Now, I wouldn't know the first step in trying to adapt it to SAMD Feathers or RP2040s, but I can imagine a goodly number of uses if it could be done... mostly in the performing arts and public display realms. (Maybe the ESP32 code for SparkFun's shield, product 15110, is a starting point?)
Next step is building the physical bits of the project, which may not happen until June, and this topic may lock by then. If it does, I'll show WIPs in a new thread. Thanks for the input.
Hallelujah!
Disciple
Please be positive and constructive with your questions and comments.