Skip to content

Commit 3d75470

Browse files
author
jenkie
committed
Faster Switch-On
1 parent 1d83c63 commit 3d75470

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Arduino_Pedelec_Controller/Arduino_Pedelec_Controller.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ int memFree()
270270
//Setup---------------------------------------------------------------------------------------------------------------------
271271
void setup()
272272
{
273+
#if HARDWARE_REV >= 2
274+
pinMode(fet_out,OUTPUT);
275+
digitalWrite(fet_out, FET_ON); // turn on whole system on
276+
#endif
273277
#if HARDWARE_REV == 20
274278
pinMode(buzzer, OUTPUT);
275279
tone(buzzer, 261, 50);
@@ -329,16 +333,12 @@ void setup()
329333
#endif
330334

331335
#if HARDWARE_REV >= 2
332-
pinMode(fet_out,OUTPUT);
333-
334336
pinMode(bluetooth_pin,OUTPUT);
335337
#ifdef SUPPORT_BLUETOOTH_ENABLE_ON_STARTUP
336338
digitalWrite(bluetooth_pin, HIGH); // turn bluetooth on during boot
337339
#else
338340
digitalWrite(bluetooth_pin, LOW); // turn bluetooth off
339341
#endif
340-
341-
digitalWrite(fet_out, FET_ON); // turn on whole system on
342342
#endif
343343
#ifdef SUPPORT_BRAKE
344344
digitalWrite(brake_in, HIGH); // turn on pullup resistors on brake

0 commit comments

Comments
 (0)