File tree Expand file tree Collapse file tree 1 file changed +38
-5
lines changed
examples/11.ArduinoISP/ArduinoISP Expand file tree Collapse file tree 1 file changed +38
-5
lines changed Original file line number Diff line number Diff line change 4646#include " Arduino.h"
4747#undef SERIAL
4848
49- // Use pin 10 to reset the target
50- #define RESET 10
5149
52- #define LED_HB 9
53- #define LED_ERR 8
54- #define LED_PMODE 7
5550#define PROG_FLICKER true
5651
5752// Configure SPI clock.
7570
7671#endif
7772
73+ // Configure which pins to use
74+
75+ // The standard pin configuration.
76+ #ifndef ARDUINO_HOODLOADER2
77+
78+ #define RESET 10 // Use pin 10 to reset the target rather than SS
79+ #define LED_HB 9
80+ #define LED_ERR 8
81+ #define LED_PMODE 7
82+
83+ // Uncomment following line to use the old uno style wiring
84+ // (using pin 11, 12 and 13 instead of the SPI header) on Leonardo, Due...
85+
86+ // #define USE_OLD_STYLE_WIRING
87+
88+ #ifdef USE_OLD_STYLE_WIRING
89+ #undef USE_HARDWARE_SPI
90+ #undef MOSI
91+ #undef MISO
92+ #undef SCK
93+ #define MOSI 11
94+ #define MISO 12
95+ #define SCK 13
96+ #endif
97+
98+ // HOODLOADER2 means running sketches on the atmega16u2
99+ // serial converter chips on Uno or Mega boards.
100+ // We must use pins that are broken out:
101+ #else
102+
103+ #define RESET 4
104+ #define LED_HB 7
105+ #define LED_ERR 6
106+ #define LED_PMODE 5
107+
108+ #endif
109+
110+
78111// Configure the serial port to use.
79112//
80113// Prefer the USB virtual serial port (aka. native USB port), if the Arduino has one:
You can’t perform that action at this time.
0 commit comments