GLOBAL SITE AUSTRALIAN SITE

Respond to IR remote button press and button lift separately | EdWare graphical 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
Respond to IR remote button press and button lift separately
July 12, 2018
7:28 pm
Micah
New Member
Members
Forum Posts: 2
Member Since:
July 12, 2018
sp_UserOfflineSmall Offline

I’ve been building a Lego car using a remote control to drive and steer. I can’t work out however how to respond to the button press/lift from the remote control to start/stop actions on the Edison. The inbuilt IR control seems to be able to act this way — it continues to perform the programmed action while the button is down, and stops when it’s lifted.

Is there any way to do this in EdWare or EdPy?

Thanks!

July 13, 2018
9:26 am
Ben
Admin
Forum Posts: 179
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi Micah,

I think the best way for you to learn how to program your car using the remotes will be to quickly read through our EdCrane tutorial. In the tutorial, it will run through how to program with both EdWare and EdPy. The key to the way we have written the code for the crane is to put the IR reading inside a while loop. 

Link: https://meetedison.com/content/EdCreate/EdBuild-EdCrane-instructions.pdf

July 15, 2018
8:41 pm
Micah
New Member
Members
Forum Posts: 2
Member Since:
July 12, 2018
sp_UserOfflineSmall Offline

Hi Isaac,

Thanks for your reply and taking the time out to help.

I’ve looked into both versions of the crane control and tested a minimal example of my own as well as both of the full versions. It appears that the program as written causes the motor to move for a short period before the motor stops, regardless of the button state on the remote. To move the motor more or less continuously takes consistent button presses.

In contrast, the built in IR program allows the motor to continue running while a button is pressed and stop when the button is released. It is this second kind of behaviour that I’m trying to achieve.

The Lego model we’ve built uses one motor for forwards/backwards, and the other for operating the rack and pinion.

I have a working program in EdWare that reads the remote state and gets the motors rolling, using the buttons to speed up and slow down with different button presses. This is good for forwards/reverse motion, but for steering it would be better to have the motor continue to spin while the button is depressed and stop when it’s released.

Thanks again!

  • 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