Sammy1Am / MoppyClassic

Moppy has been replaced with Moppy 2.0!
568 stars 191 forks source link

PinMode(13, OUTPUT) in Arduino code is used twice #189

Open redcubie opened 6 years ago

redcubie commented 6 years ago

In Moppy.ino there is double mention of pin no. 13:

void setup(){
  pinMode(13, OUTPUT);// Pin 13 has an LED connected on most Arduino boards
  [pinMode(2-12, OUTPUT)]
  pinMode(13, OUTPUT); // Direction 6

But you could just do:

void setup(){
//Remove(d) first pinMode(13, OUTPUT)
  [pinMode(2-12, OUTPUT)]
  pinMode(13, OUTPUT); // Direction 6 and most Arduino boards have an LED connected to this pin
Sammy1Am commented 6 years ago

Good catch; it's been resolved in the upcoming Moppy 2.0 code. I'll leave this open in case I come back to cleanup this code, but it'll probably just be superseded once I get 2.0 into a usable state.