Skip to content

Commit

Permalink
fix some more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Nov 14, 2022
1 parent 65589bd commit c3a90bf
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <tinyNeoPixel.h>


#define PIN PIN_PC3 //chosen because all Dx and Ex parts have itz
#define PIN PIN_PC1 //chosen because all Dx and Ex parts have itz
#define NUM_LEDS 60

#define BRIGHTNESS 50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
// driven with a pull-up resistor so the switch should
// pull the pin to ground momentarily. On a high -> low
// transition the button press logic will execute.

#if _AVR_PINCOUNT == 14
#define PIXEL_PIN PIN_PD4 // need to use a different pin on DD14
#else
#define PIXEL_PIN PIN_PA3 // Digital IO pin connected to the NeoPixels
#endif


#define PIXEL_COUNT 16

Expand Down
7 changes: 6 additions & 1 deletion megaavr/libraries/tinyNeoPixel/examples/simple/simple.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@


// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 3
#if _AVR_PINCOUNT == 14
#define PIXEL_PIN PIN_PD4 // need to use a different pin on DD14
#else
#define PIXEL_PIN PIN_PA3 // Digital IO pin connected to the NeoPixels
#endif


// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <tinyNeoPixel.h>

#define PIN PIN_PC3 //For DxCore, the example uses PC1 whichexists on all parts
#define PIN PIN_PC1 //For DxCore, the example uses PC1 whichexists on all parts

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
// pull the pin to ground momentarily. On a high -> low
// transition the button press logic will execute.

#if _AVR_PINCOUNT == 14
#define PIXEL_PIN PIN_PD4 // need to use a different pin on DD14
#else
#define PIXEL_PIN PIN_PA3 // Digital IO pin connected to the NeoPixels
#endif

#define PIXEL_COUNT 16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@


// Which pin on the Arduino is connected to the NeoPixels?
#define PIN 3
#if _AVR_PINCOUNT == 14
#define PIXEL_PIN PIN_PD4 // need to use a different pin on DD14
#else
#define PIXEL_PIN PIN_PA3 // Digital IO pin connected to the NeoPixels
#endif

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 16
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include <tinyNeoPixel_Static.h>

#define PIN 3
#if _AVR_PINCOUNT == 14
#define PIN PIN_PD4 // need to use a different pin on DD14
#else
#define PIN PIN_PA3 // Digital IO pin connected to the NeoPixels
#endif

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
Expand Down

0 comments on commit c3a90bf

Please sign in to comment.