isl-org / OpenBot

OpenBot leverages smartphones as brains for low-cost robots. We have designed a small electric vehicle that costs about $50 and serves as a robot body. Our software stack for Android smartphones supports advanced robotics workloads such as person following and real-time autonomous navigation.
https://www.openbot.org
MIT License
2.82k stars 528 forks source link

Test indicator leds #93

Closed nanotuxi closed 3 years ago

nanotuxi commented 3 years ago

Building this project is a lot of fun. Thanks for it. One thing that irritated me at the beginning when the indicator led have been wired and 1st tests were successful everything worked but the leds seemed to be unresponsive. Reading the source code I found the reason was that they only work, if a game pad controller is attached via bluetooth for training the model. As I do not have a game controller at all (although I like to play very much ;-) the leds would never work?!?

To see if the wiring of the leds are made correctly I simply wrote some test code that is executed in the init phase of the arduino and lets the leds blink once for 1 second by simply adding these lines in the setup() of openbot_v1_nano.ino:

    {
    [... ]
     // test if the led wiring is correct
      digitalWrite(PIN_LED_RB,HIGH);
      delay(1000);
      digitalWrite(PIN_LED_RB,LOW);
      delay(1000);
      digitalWrite(PIN_LED_LB,HIGH);
      delay(1000);
      digitalWrite(PIN_LED_LB,LOW);
    [...]
    }
thias15 commented 3 years ago

Thanks. Will add this to next firmware update.

thias15 commented 3 years ago

This is now added in PR #92.

nanotuxi commented 3 years ago

Thanks for that.

francisduvivier commented 3 years ago

Tx!