loading
2 Comments

Tell us about yourself!

Complete Your Profile
  • Make Your Own Electric Motorized Longboard

    Hi All, I used the original code of this project to made an electric longboard and I made some changes to my needs, for example I changed the delay for different timing during acceleration and braking, I decreased the maximum value of ESC because with the ESC in my possession I reached the speed of 60 km / h.The project to which I have inspired for the longboard is http://www.thingiverse.com/thing:1106235. Instead, for the electronic part I used the project above.Thank to great scott for this project.P.S.: The comments in the sketch are in Italian.... lol ;)<SoftwareServo.h> int potentiometer=A1;int button1=4;int button2=3;int potval;int curval;int PausaSiNo = 1; //ATTIVA DISATTIVA IL DELAY (0 Disattiva) (1 Attiva)int Decelerazione = 2; //VALORE DEL DELAY MODIFICARE QUESTO VA...see more »Hi All, I used the original code of this project to made an electric longboard and I made some changes to my needs, for example I changed the delay for different timing during acceleration and braking, I decreased the maximum value of ESC because with the ESC in my possession I reached the speed of 60 km / h.The project to which I have inspired for the longboard is http://www.thingiverse.com/thing:1106235. Instead, for the electronic part I used the project above.Thank to great scott for this project.P.S.: The comments in the sketch are in Italian.... lol ;)<SoftwareServo.h> int potentiometer=A1;int button1=4;int button2=3;int potval;int curval;int PausaSiNo = 1; //ATTIVA DISATTIVA IL DELAY (0 Disattiva) (1 Attiva)int Decelerazione = 2; //VALORE DEL DELAY MODIFICARE QUESTO VALORE PER MODIFICARE IL TEMPO DI DECELERAZIONE PIU IL VALORE È BASSO PIU AUMENTA LA DECELERAZIONEint Accelerazione = 50; //VALORE DEL DELAY IN ACCELERAZIONE MODIFICARE QUESTO PER MODIFICARE I TEMPI DI ACCELERAZIONE PIU IL VALORE È ALTO PIU I TEMPI ACCELLERAZIONE AUMENTANOSoftwareServo ESC;void setup() { pinMode(potentiometer, INPUT); pinMode(button1, INPUT); pinMode(button2, INPUT); ESC.attach(9); //Prima era a 1 (È IL PIN DELL'ARDUINO CUI È COLLEGATO IL TRASMETTITORE) curval=0; ESC.setMinimumPulse(800); ESC.setMaximumPulse(1500); //PRIMA ERA 2000}void loop() { while (digitalRead(button1)==HIGH){ potval=analogRead(potentiometer); potval=map(potval,0,1023,0,180); while(curval<potval){ potval=analogRead(potentiometer); potval=map(potval,0,1023,0,180); curval=curval+1; ESC.write(curval); SoftwareServo::refresh(); if(PausaSiNo == 1){ delay(Accelerazione); } while(digitalRead(button2)==HIGH){ ESC.write(curval); SoftwareServo::refresh();}} while(curval>potval){ potval=analogRead(potentiometer); potval=map(potval,0,1023,0,180); curval=curval-1; ESC.write(curval); SoftwareServo::refresh(); if(PausaSiNo == 1){ delay(Decelerazione); } while(digitalRead(button2)==HIGH){ ESC.write(curval); SoftwareServo::refresh();}} ESC.write(curval); SoftwareServo::refresh();} potval=0; while(curval>potval){ curval=curval-1; ESC.write(curval); SoftwareServo::refresh(); if(PausaSiNo == 1){ delay(Decelerazione); }}

    View Instructable »