Flashing light from radio?
Flashing light from radio?
Hi guys. I have seen this:
https://www.youtube.com/watch?v=99IMR3wdFb4
And I wonder if it would be possible to do it with the radio. Yup, I know I need an electronic switch plugged to the receiver, but do you know if it would be possible to switch it on and off like that, just pressing a momentary push button in the radio?
Thanks as always!
https://www.youtube.com/watch?v=99IMR3wdFb4
And I wonder if it would be possible to do it with the radio. Yup, I know I need an electronic switch plugged to the receiver, but do you know if it would be possible to switch it on and off like that, just pressing a momentary push button in the radio?
Thanks as always!
https://radindustries.wordpress.com/
Re: Flashing light from radio?
What radio?
Re: Flashing light from radio?
Sorry, a 9x with a 9xtreme and some push buttons installed at the back and a 9xr pro.
https://radindustries.wordpress.com/
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Flashing light from radio?
One way would be to write a script. On ersky9x you may use a logical switch as the source of a mix, and you may also set the logical switch value from a script. Using those features, you may easily program a sequence of channel outputs.
Mike
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Flashing light from radio?
Is any tutorial out there of how to do it?
https://radindustries.wordpress.com/
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Flashing light from radio?
No tutorial, but there is a document describing the script language, see: http://openrcforums.com/forum/viewtopic.php?f=7&t=10325.
I'll see if I can create a script as a starting point.
Mike
I'll see if I can create a script as a starting point.
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Flashing light from radio?
Well, I took a look to the script, and for an ignorant like me, it looks impossible, lol.MikeB wrote: ↑Fri Apr 27, 2018 10:06 am No tutorial, but there is a document describing the script language, see: http://openrcforums.com/forum/viewtopic.php?f=7&t=10325.
I'll see if I can create a script as a starting point.
Mike
If you manage to do it, it will be awesome. Just more features to the radio!
https://radindustries.wordpress.com/
Re: Flashing light from radio?
Another ignorant here
For sure some good examples could probably get us mortals started
Thanks again for all Mike
João
For sure some good examples could probably get us mortals started
Thanks again for all Mike
João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9
Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Flashing light from radio?
OK, so here's a small script. I tested this using a servo on channel 8, with a mix on channel 8 of:
+100% L6
The script declares a byte array to contain a sequence of 1s and 0s that are output at regular intervals. I initialise the array using the strtoarray() function. Note that this function puts a zero byte on the end as a string terminator, so the array needs to be declared at least 1 larger than the number of entries you are using.
Displaying "Light Test" is optional, but it does help show the script is running.
gettime returns elapsed time in units of 10mS, so waiting for 40 to pass is 400mS of time.
I set logical switch L6 to the value an entry in the sequence. I also set the variable "value" just so I can display it later to see it working on the Tx. The index to the sequence is incremented to the next entry, wrapping back to the start when it reaches 14 or more.
Mike
+100% L6
The script declares a byte array to contain a sequence of 1s and 0s that are output at regular intervals. I initialise the array using the strtoarray() function. Note that this function puts a zero byte on the end as a string terminator, so the array needs to be declared at least 1 larger than the number of entries you are using.
Displaying "Light Test" is optional, but it does help show the script is running.
gettime returns elapsed time in units of 10mS, so waiting for 40 to pass is 400mS of time.
I set logical switch L6 to the value an entry in the sequence. I also set the variable "value" just so I can display it later to see it working on the Tx. The index to the sequence is incremented to the next entry, wrapping back to the start when it reaches 14 or more.
Code: Select all
array byte sequence[16]
if init = 0
init = 1
strtoarray( sequence[0], "\x00\x00\x00\x01\x01\x01\x00\x00\x01\x01\x00\x01\x00\x01" )
index = 0
lasttime = gettime()
value = 0
end
drawclear()
drawtext(20, 16, "Light Test", 0)
if gettime() - lasttime > 40
lasttime += 40
value = sequence[index]
setswitch( "L6", sequence[index] )
index += 1
if index > 13 then index = 0
end
drawnumber( 20, 24, value )
if Event = EVT_EXIT_BREAK then goto done
stop
done:
finish
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!
Re: Flashing light from radio?
And how do I insert this in the radio?
https://radindustries.wordpress.com/
- MikeB
- 9x Developer
- Posts: 17993
- Joined: Tue Dec 27, 2011 1:24 pm
- Country: -
- Location: Poole, Dorset, UK
Re: Flashing light from radio?
It's described at the start of the "Scripts.pdf" I linked to above, treat it as a "standalone" script for now. You run it from the main popup window (MENU LONG from the main screen).
Mike
Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
The difficult we do immediately,
The impossible takes a little longer!