GLOBAL SITE AUSTRALIAN SITE

Reading remote on an event not working | EdPy Programming | Forum

Please consider registering
guest

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

Topic3
Reading remote on an event not working
June 17, 2019
12:36 pm
Eric
Member
Members
Forum Posts: 4
Member Since:
February 17, 2019
sp_UserOfflineSmall Offline

Mr. TRex. I was just writing a remote control program and ran into the same issue as you. I discovered that the problem has nothing to do with the register. The problem is that the barcodes for the setting the remote codes on this page https://meetedison.com/robot-activities/youre-a-robot-programmer/remote-control-barcodes/are wrong.yelledison

The correct barcodes:

1. remote code #0

2. remote code #1

3. remote code #4

4. remote code #5

5. Remote code #2

6. Remote code #3

7. Remote code #6

8. Remote code #7

I used your code to write this simple remote control program. Using a DVD universal remote, I set up arrow = 0, left arrow = 1, right arrow = 2, down arrow = 3, ok/select = 4. Feel free to use/reuse.

#——–Your code below———–

def remotePress():
    Ed.PlayBeep()
    rc = Ed.ReadRemote()

    if rc == Ed.REMOTE_CODE_0:
      Ed.Drive(Ed.FORWARD, Ed.SPEED_1, Ed.DISTANCE_UNLIMITED)
    elif rc == Ed.REMOTE_CODE_1:
      Ed.Drive(Ed.FORWARD_LEFT, Ed.SPEED_1, Ed.DISTANCE_UNLIMITED)

    elif rc == Ed.REMOTE_CODE_2:
      Ed.Drive(Ed.FORWARD_RIGHT, Ed.SPEED_1, Ed.DISTANCE_UNLIMITED)

    elif rc == Ed.REMOTE_CODE_3:
      Ed.Drive(Ed.BACKWARD, Ed.SPEED_1, Ed.DISTANCE_UNLIMITED)

    elif rc == Ed.REMOTE_CODE_4:
      Ed.Drive(Ed.STOP, Ed.SPEED_1, Ed.DISTANCE_UNLIMITED)

Ed.RegisterEventHandler(Ed.EVENT_REMOTE_CODE, “remotePress”)

while True:
    Ed.TimeWait(1, Ed.TIME_SECONDS)

June 19, 2019
9:14 am
Ben
Admin
Forum Posts: 178
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi Eric,

Thank you for raising this issue. I have forwarded on this information to the website team who will address this.

Regards, 
Isaac

June 21, 2019
10:16 am
Ben
Admin
Forum Posts: 178
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi Eric,

I am happy to say that the page has been updated and the remote codes/barcodes all line up correctly now. 

Regards,
Isaac.

  • 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

Country

Pin It on Pinterest

Share This