Adafruit pro trinket with ws2812 pixel rings

Ive had success using wemos boards but cant figure this one out. Ive researched and read all the tutorials on Adafruits site for making these goggles. My Pc is on windows 11 also. Heres the error i get when uploading code

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Pro Trinket 5V/16MHz (FTDI)"

Sketch uses 3670 bytes (12%) of program storage space. Maximum is 28672 bytes.

Global variables use 55 bytes of dynamic memory.

avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.

Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

And heres the code

Text: 2017 Mikey Sklar for Adafruit Industries
//
// SPDX-License-Identifier: MIT// SPDX-FileCopyright

// Low power NeoPixel goggles example.  Makes a nice blinky display
// with just a few LEDs on at any time.

#include <Adafruit_NeoPixel.h>
#ifdef __AVR_ATtiny85__ // Trinket, Gemma, etc.
#include <avr/power.h>
#endif

#define PIN 0

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(32, PIN);

uint8_t  mode   = 0, // Current animation effect
         offset = 0; // Position of spinny eyes
uint32_t color  = 0xFF0000; // Start red
uint32_t prevTime;

void setup() {
#ifdef __AVR_ATtiny85__ // Trinket, Gemma, etc.
  if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
  pixels.begin();
  pixels.setBrightness(85); // 1/3 brightness
  prevTime = millis();
}

void loop() {
  uint8_t  i;
  uint32_t t;

  switch (mode) {

    case 0: // Random sparks - just one LED on at a time!
      i = random(32);
      pixels.setPixelColor(i, color);
      pixels.show();
      delay(10);
      pixels.setPixelColor(i, 0);
      break;

    case 1: // Spinny wheels (8 LEDs on at a time)
      for (i = 0; i < 16; i++) {
        uint32_t c = 0;
        if (((offset + i) & 7) < 2) c = color; // 4 pixels on...
        pixels.setPixelColor(   i, c); // First eye
        pixels.setPixelColor(31 - i, c); // Second eye (flipped)
      }
      pixels.show();
      offset++;
      delay(50);
      break;
  }

  t = millis();
  if ((t - prevTime) > 8000) {     // Every 8 seconds...
    mode++;                        // Next mode
    if (mode > 1) {                // End of modes?
      mode = 0;                    // Start modes over
      color >>= 8;                 // Next color R->G->B
      if (!color) color = 0xFF0000; // Reset to red
    }
    for (i = 0; i < 32; i++) pixels.setPixelColor(i, 0);
    prevTime = t;
  }
}

Does COM3 exists in Windows device manager when the board is connected?

I can see you made and attempt to use code tags but it did not quite work out. Please edit your post

  1. remove the < before the code
  2. remove the > after your code
  3. select all code
  4. click the </> button in the edit window
  5. save your post

Sorry about that. Im 42 and not good with computers. lol I corrected it now thanks.
Port isnt even Highlighted when i have the Trinket connected. Just has USBTinyISP under programmer. When i connect my wemos d1r2 boards the port shows COM3

These are what im making and ive tried everything i can think of to program the board.

Overview | Kaleidoscope Eyes (Trinket-Powered NeoPixel LED Ring Goggles) | Adafruit Learning System

Thanks for fixing the code.

I'm not familiar with your board. The Pro Trinket works differently from other boards and, from what I can gather, COM3 is not your Pro Trinket and USBTinyISP is.
Using the USB Bootloader | Introducing Pro Trinket | Adafruit Learning System has a description how to start the USB bootloader.
Setting up Arduino IDE | Introducing Pro Trinket | Adafruit Learning System describes how to program the Pro Trinket.

Thanks ive tried all that without any luck. Geuss ill stick to the wemos boards.

Ok for anyone with this issue just go to board managers and download adafruit SAMD then select trinket mo SAMD then install your code

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.