digistump / DigistumpArduino

Files to add Digistump support (Digispark, Pro, DigiX) to Arduino 1.6.X (1.6.5+)
934 stars 377 forks source link

Small modification to START example #88

Open AingeruJM opened 5 years ago

AingeruJM commented 5 years ago

Hi,

maybe it is a dumb suggestion, but START example could be modified so it is easier (faster) to detect the type of Model (A or B)

Find below my humble suggestion: `// the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(0, OUTPUT); //LED on Model B pinMode(1, OUTPUT); //LED on Model A or Pro }

// the loop routine runs over and over again forever: void loop() { digitalWrite(0, HIGH); // on Model B => turn the LED on (HIGH is the voltage level) digitalWrite(1, LOW); // on Model A => turn the LED off by making the voltage LOW delay(500); // wait for a second digitalWrite(0, LOW); // on Model B => turn the LED off by making the voltage LOW digitalWrite(1, HIGH); // on Model A => turn the LED on (HIGH is the voltage level) delay(2000); // wait for a second }`

Ideas/comments on this point would be accepted.

Best regards,