Making Edison move with TV/DVD remote | EdPy Programming | Forum

Please consider registering

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

Making Edison move with TV/DVD remote
May 15, 2018
2:58 am
New Member
Forum Posts: 2
Member Since:
May 15, 2018
sp_UserOfflineSmall Offline

I am trying to get Edison to move with the DVD remote.  I want Edison to continue moving when I am holding down the button on the remote.  However, with my code he just moves 5 cm and then I have to press the button again to have him move another 5 cm.  What can I add to my code so that he continuously moves as long as I am holding the remote button down?

while True:
     remoteValue = Ed.ReadRemote()

     if remoteValue == 0:
          Ed.Drive(Ed.FORWARD, Ed.SPEED_6, 5)

May 15, 2018
9:58 am
Forum Posts: 180
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline


heres a good example of the basic program:

You can extend this to accept more remote codes by adding more “elif” statements

May 16, 2018
4:02 am
Forum Posts: 9
Member Since:
May 13, 2018
sp_UserOfflineSmall Offline

When you press a button on the remote it blasts the same code over and over again to the Edison.  This is to increase reliability, since you have no guarantee that any one message will make it through.  I suspect on the Edison (and on your TV) once a message is received a timeout period is activated that either waits for a length of time before responding again, or more likely waits till the command is no longer received before preparing to process the next message.

Without this timeout pressing a button on your remote would result in many precieved button presses at the Edison robot or TV.  In other words typing 5 to turn to channel 5 would result in the TV seeing the number 5555555555555555555.  

If you want to continually drive you can change the logic around so that pressing a button flips the robot to a new state.  So pressing forward will switch from idle to driving leaving the motors running until you hear a turning or stop signal from the remote.  Then rather than holding down the forward button you simply press and release it and the robot will drive forward until you press and release a different button.

  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead


Pin It on Pinterest

Share This