A-star 32u4 and a bit of translation

Hello!

Basiclaly, I am trying to use a 32u4 for an Adalight project (learn.adafruit.com/adalight-diy … v-lighting)

Now, I have figured out that the 32u4 has the SPI-interface in the ISP-header. Great. But i am trying to figure out how to modify the sketch to run with 32u4 instead of an Uno (or similar). Basically, I have tried quite a few versions of pin definitions without any joy. Could someone offer up advice to wireing/config?

If i do use an Arduino Uno all is well. But i like the 32u4 as it is small enough to just mount behind the TV.

// LED pin for Adafruit 32u4 Breakout Board:
//#define LED_DDR  DDRE
//#define LED_PORT PORTE
//#define LED_PIN  _BV(PORTE6)
// LED pin for Teensy:
//#define LED_DDR  DDRD
//#define LED_PORT PORTD
//#define LED_PIN  _BV(PORTD6)
// LED pin for Arduino:
#define LED_DDR  DDRB
#define LED_PORT PORTB
#define LED_PIN  _BV(PORTB5)

Hello.

The A-Star 32U4 Micro uses Atmel’s ATmega32U4 microcontroller. Uncommenting the #define lines for the LED pins under the “32u4 Breakout Board” (and commenting the lines under “Arduino”) and connecting to the MOSI and SCLK pins on the A* should work:

// LED pin for Adafruit 32u4 Breakout Board:
#define LED_DDR  DDRE
#define LED_PORT PORTE
#define LED_PIN  _BV(PORTE6)
// LED pin for Teensy:
//#define LED_DDR  DDRD
//#define LED_PORT PORTD
//#define LED_PIN  _BV(PORTD6)
// LED pin for Arduino:
//#define LED_DDR  DDRB
//#define LED_PORT PORTB
//#define LED_PIN  _BV(PORTB5)

- Jeremy

Hello!

First, I would like to apologize for making my post a bit vague and thereby wasting your time :slight_smile:

That (changing the defs) to those of the 32u4 was one of the first things i tried. But, i got no response from the LED strand when I did do. That is when I started trying “Other stuff”.

But, If i read you correctly, changing the defs and hooking up to the ISP-header should be all I need to do?

I hooked up an oscilloscop (well, a cheap DSO clone…) and I do not see a pulse train on the ISP pins the same way as I do when I try with the (working) Arduino UNO.

So, any advice on what I should check next?

Thanks!

Found the issue. And now I feel slightly silly. I have now noticed that uploading of skethes was a bit hit-and-miss to the Pololu when I hade the USB connected to a USB3-port on my computer. Since moving it to USB2 all has been well.

So, I am leaning towards that I was simply running with the “wrong sketch” when i thought I hade the correct defines. And the “correct sketch” when i tried with other (incorrect) defines.

Oh, also, using USB3 from another computer seem to be fine also.

Again, my apologies.

I am glad you got it working. Thanks for letting us know.

By the way, I do not generally expect there to be any issues when programming the A* through a USB 3.0 port.

- Jeremy

Nah, I will chalk this upp to buggy/strange USB3 drivers for that system. I have now tried it on a third and fourth computer. No issues at all with USB3 there either.