avatar

oscarvs

Member Since: October 5, 2012

Country: Venezuela

  • Product SEN-00242 | about a year ago

    To get centimeters:

    int i;
    int val;
    int redpin=0;
    void setup() {
        pinMode(redpin,OUTPUT);
        Serial.begin(9600);
    }
    void loop() {
        i=analogRead(redpin);
        val=(6762/(i-9))-4;
        Serial.println(val);
    }
    
Name Pieces Total
kakao
29 279.75