Tell us about yourself!

Complete Your Profile
  • CornelN1 commented on leonardor's instructable Arduino Skateboard Speedometer3 years ago
    Arduino Skateboard Speedometer

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)...

    see more »

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)int lastButtonState = 0; // starea anterioara a senzorului de linie (1 sau zero)long time = 0;void setup() {// inititalizeaza intrarea pentru senzorul de linie:pinMode(buttonPin, INPUT);// initializeaza comunicatia seriala:Serial.begin(115200);Serial.println("________________________");Serial.println("Program test");Serial.println("________________________");}void loop() {// citeste intrarea senzorului de linie:buttonState = digitalRead(buttonPin);time = 0;// compara starea butonului actuala cu cea anterioaraif (buttonState != lastButtonState) {// if the state has changed, increment the counterif (buttonState == HIGH) {// if the current state is HIGH then the button// wend from off to on:buttonPushCounter++;time++;}Serial.print("Deplasare [mm]: ");Serial.println(buttonPushCounter*20);Serial.print("Timp [s]: ");time = millis();//prints time since program startedSerial.println(time/1000);Serial.print("Viteza [mm/s]: ");Serial.println((buttonPushCounter*20)/(time/1000));Serial.println("________________________");// Delay a little bit to avoid bouncingdelay(1);}// save the current state as the last state,//for next time through the looplastButtonState = buttonState;time = 0;}

    View Instructable »
  • CornelN1 commented on electroguyz's instructable DIY SPEEDOMETER AND ODOMETER3 years ago
    DIY SPEEDOMETER AND ODOMETER

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)...

    see more »

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)int lastButtonState = 0; // starea anterioara a senzorului de linie (1 sau zero)long time = 0;void setup() {// inititalizeaza intrarea pentru senzorul de linie:pinMode(buttonPin, INPUT);// initializeaza comunicatia seriala:Serial.begin(115200);Serial.println("________________________");Serial.println("Program test");Serial.println("________________________");}void loop() {// citeste intrarea senzorului de linie:buttonState = digitalRead(buttonPin);time = 0;// compara starea butonului actuala cu cea anterioaraif (buttonState != lastButtonState) {// if the state has changed, increment the counterif (buttonState == HIGH) {// if the current state is HIGH then the button// wend from off to on:buttonPushCounter++;time++;}Serial.print("Deplasare [mm]: ");Serial.println(buttonPushCounter*20);Serial.print("Timp [s]: ");time = millis();//prints time since program startedSerial.println(time/1000);Serial.print("Viteza [mm/s]: ");Serial.println((buttonPushCounter*20)/(time/1000));Serial.println("________________________");// Delay a little bit to avoid bouncingdelay(1);}// save the current state as the last state,//for next time through the looplastButtonState = buttonState;time = 0;}

    View Instructable »
  • Arduino-based Chronometer for Electric Car Racing Tracks

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)...

    see more »

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)int lastButtonState = 0; // starea anterioara a senzorului de linie (1 sau zero)long time = 0;void setup() {// inititalizeaza intrarea pentru senzorul de linie:pinMode(buttonPin, INPUT);// initializeaza comunicatia seriala:Serial.begin(115200);Serial.println("________________________");Serial.println("Program test");Serial.println("________________________");}void loop() {// citeste intrarea senzorului de linie:buttonState = digitalRead(buttonPin);time = 0;// compara starea butonului actuala cu cea anterioaraif (buttonState != lastButtonState) {// if the state has changed, increment the counterif (buttonState == HIGH) {// if the current state is HIGH then the button// wend from off to on:buttonPushCounter++;time++;}Serial.print("Deplasare [mm]: ");Serial.println(buttonPushCounter*20);Serial.print("Timp [s]: ");time = millis();//prints time since program startedSerial.println(time/1000);Serial.print("Viteza [mm/s]: ");Serial.println((buttonPushCounter*20)/(time/1000));Serial.println("________________________");// Delay a little bit to avoid bouncingdelay(1);}// save the current state as the last state,//for next time through the looplastButtonState = buttonState;time = 0;}

    View Instructable »
  • CornelN1 commented on amandaghassaei's instructable Arduino Bike Speedometer3 years ago
    Arduino Bike Speedometer

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de lini...

    see more »

    Hello,i am workind on something similar, he differences are:- i have a line follower sensor on digital pin 2- i have a black and white stripe with 20 mm between 2 white stripes- i need the output on the serial monitor, and not on the lcd.i have put up a sketch, but i have some issues with the time.i need to:- start the counting every time the pin 2 changes (the sensor has moved) and count the millis until next pin 2 changes, and have the speed. at the end, if the pin 2 does not changes for 1 sec, the program stop'scan someone help me?i have this sketch until now:// Constante:const int buttonPin = 2; // pinul digital pentru senzorul de linie// Variabile:int buttonPushCounter = 0; // counter numar impulsuri (1 sau 0)int buttonState = 0; // starea actuala a senzorului de linie (1 sau zero)int lastButtonState = 0; // starea anterioara a senzorului de linie (1 sau zero)long time = 0;void setup() { // inititalizeaza intrarea pentru senzorul de linie: pinMode(buttonPin, INPUT); // initializeaza comunicatia seriala: Serial.begin(115200); Serial.println("________________________"); Serial.println("Program test"); Serial.println("________________________");}void loop() { // citeste intrarea senzorului de linie: buttonState = digitalRead(buttonPin); time = 0; // compara starea butonului actuala cu cea anterioara if (buttonState != lastButtonState) { // if the state has changed, increment the counter if (buttonState == HIGH) { // if the current state is HIGH then the button // wend from off to on: buttonPushCounter++; time++; }Serial.print("Deplasare [mm]: ");Serial.println(buttonPushCounter*20); Serial.print("Timp [s]: "); time = millis(); //prints time since program started Serial.println(time/1000); Serial.print("Viteza [mm/s]: "); Serial.println((buttonPushCounter*20)/(time/1000)); Serial.println("________________________"); // Delay a little bit to avoid bouncing delay(1); } // save the current state as the last state, //for next time through the loop lastButtonState = buttonState; time = 0;}

    View Instructable »