GLOBAL SITE AUSTRALIAN SITE

[SOLVED] How to use "Remote Control" read block? | 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
[SOLVED] How to use "Remote Control" read block?
November 5, 2016
4:40 pm
edison101
Member
Members
Forum Posts: 15
Member Since:
November 4, 2016
sp_UserOfflineSmall Offline

The sample program “Take Control” show how to take input via a TV remote.

I want to control the Edison via TV remote for 4 basic motions (forward, backward, right and left).

I couldn’t figure out how I modify the above program to adapt to my requirements.

I also tried using “Remote Control” block and get its value to a variable, but how do I know what value has been received so that I can take corresponding action?

November 7, 2016
4:06 am
gustavlemmy
New Member
Members
Forum Posts: 2
Member Since:
November 7, 2016
sp_UserOfflineSmall Offline

Hi there – I have spent the weekend trying to figure out exactly the same thing. I would like to build a programme with my son, where we use sensors and variables to control how edison behaves (rather than use the bar codes). But I don’t know (or understand) how to determine the variable that will be created by a given button press on the remote control.

I really love the concept of Edison, but a lots of the finer detail on using sensors and variable combinations is not contained in any of the EdBooks. Are there plans for further resources? Perhaps an EdWiki?

November 7, 2016
10:12 am
Ben
Admin
Forum Posts: 179
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi!

To use multiple remote control buttons you need to add IF statements to your program.

I have done up a simple example that drives Edison forward when Edison receives remote code 1 and backwards when Edison receives remote code 2.

http://www.edwareapp.com/share/Aucwc

You can extent this code by adding more if statements and moving the stop to the lowest if statement

November 8, 2016
8:22 am
gustavlemmy
New Member
Members
Forum Posts: 2
Member Since:
November 7, 2016
sp_UserOfflineSmall Offline

Thank you so much for such a quick reply. cool

A couple more questions:

1 – The car has a stutter when in reverse, I wondered what in the programme is causing this? This is definitely not related to the hardware, as I tried swapping the drives in the programme. Is this related to the “event wait” 

2 – I have managed to find a couple of the buttons on my remote, but I wondered if you have a mapping of the numbers (#) on standard remotes?

November 8, 2016
11:28 am
Ben
Admin
Forum Posts: 179
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi 

Edison comes pre-programmed with a set of remote codes stored in its barcode memory.

You can make Edison learn new remote codes using TV remote control barcodes page in EdBook2

In regards to the stutter it may be related to your tv remote sending signals slower then Edison is looking for them.

Increasing the amount of time in the wait event would fix this case

November 8, 2016
7:46 pm
edison101
Member
Members
Forum Posts: 15
Member Since:
November 4, 2016
sp_UserOfflineSmall Offline

Ben said
Hi!

To use multiple remote control buttons you need to add IF statements to your program.

I have done up a simple example that drives Edison forward when Edison receives remote code 1 and backwards when Edison receives remote code 2.

http://www.edwareapp.com/share/Aucwc

You can extent this code by adding more if statements and moving the stop to the lowest if statement  

Hi Ben,

Thanks t worked, will do more testing later!

November 8, 2016
9:04 pm
edison101
Member
Members
Forum Posts: 15
Member Since:
November 4, 2016
sp_UserOfflineSmall Offline

It works but the behavior is:

Forward button pressed: moves forward a little and stops

Back button pressed: moves backward a little and stops

How can I make it move the same way as it does when I load the “Remote control” program via bar-code (as in “I am a controller” eBook)?

I have tried removing the “Stop” block, but that didn’t do the trick.

The desired behavior is that if Forward buttons is kept pressed, it should continue moving without stopping and only stop when button is released.

The same goes for Back button.

November 16, 2016
2:46 pm
Ben
Admin
Forum Posts: 179
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi 

I have been looking into this, using an Edison V2.0

I have had a little difficulty getting the same behaviour as the remote barcodes.

I am going to try and track down the original code for the barcode functions.

Also a quick note, please dont remove the Stop, the fact that the motors stop, shows that the code is running that line in the code (and from my testing it running it repeatedly) so the error is not in that section of the code, but in the fact that section of code is being run on a duplicate instance of a remote code

November 17, 2016
5:52 pm
edison101
Member
Members
Forum Posts: 15
Member Since:
November 4, 2016
sp_UserOfflineSmall Offline

Hi Ben,

I managed to resolve it and my current behavior is closed to what I wanted.

I spent a lot of time debugging IR. It seems like “Event happens – Data from TV remote” is buggy, at least it did not work for me. If I press button 1, it would respond as if button 2 was pressed. I tried barcode learning and programming over and over again but the behavior was same.

I then switched to reading Remote Control into a variable and then using that variable as “Test passes – “, it worked great.

Point to note is that:

variable = 1 means button#1 is pressed

variable = 2 means button#2 is pressed and so on.

variable = 0 didn’t work, it will make the conditions always True, probably due to internal firmware logic so, I just skipped it.

Here is the program for reference. [EDIT: broken link removed]

The robot behavior as per above program is:

Button#1 pressed once = The robot moves forward and continues moving

Button#2 pressed once = The robot moves backward and continues moving

Button#3 pressed once = The robot stops immediately

March 24, 2017
4:37 am
nburtchgrts-org
New Member
Members
Forum Posts: 1
Member Since:
March 24, 2017
sp_UserOfflineSmall Offline

We have never been able to get more than 1 button at a time on the remote to work.  What steps are we missing?  If I run the Edison across a barcode, than all the buttons on the remote (regardless of which we press after scanning the barcode) do the action from the barcode.  If we try to program a second button, it erases the first action and all the buttons on the remote do the second action.

Thank you to edison101 for sharing your program.  The program makes sense, but I still cannot get two different commands out of our remote.  

Any ideas or suggestions?

Thank you!

  • 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