|
|
|
|
|
|
|
|
UK
Joined Mar 2007
340 Posts
|
Scripting
I have finally uploaded code to allow scripts to be run on either the receiver or the pc. On the receiver the script is run just before the servo outputs are sent, it could be used for all sorts of things. The script has access to any variables marked as 'routed' i.e. anything you can see from the pc interface can be scripted. Script on the pc can access the tx, rx and any sensors connected.
This video shows crude script running on the pc making the bottom half of a robot walk. http://www.youtube.com/watch?feature...&v=oiiNwSm9mbY I have also added code to access a mpu6050 gyro over i2c on the receiver. Alan |
|
|
||
|
UK
Joined Mar 2007
340 Posts
|
I've just uploaded some improvements to the scripting.
Array and property syntax now works so setting a channel value is now cleaner tx.TXInputs[2]=2000 string constants can be used and function overloading now works so print(23) and print("hello") now works I've added speech output on the pc ( at the demand of the project director, my son) say("speed is") say(123) The rx now has some extra properties rx.frameCounter - can be used as a clock eg. rx.RXMixedDemands[5]=abs(rx.frameCounter%80-40)*40 will scan a servo from side to side rx.missedFrames contains how many frames ago data was received so can be used to do clever failsafe code pilot.vars[0..39] is a array that can be used to store stuff between frames Quote:
Alan |
|
|
||
|
|
|
|
|
Aaaha - WIBNI rules ok
![]() When someone says Wouldn't It Be Nice If it did this that and/or t'other, think about the minimum system requirements of Windows, which grew out of a DIY dos for an little known cludge up on a failed pocket calculator chip ((((two 4040's glued together --> 8080)*2 -> 8086)*2 -> 486)*2 -> pentium ) ad nausium onwards and upwards but don't look down, it will make you dizzy.Mike |
|
|
|
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Idea Spektrum DX6 DIY Transmitter antenna replacement using 2.4GHz Wireless network parts? | jaskew | Radios | 18 | Jun 17, 2009 12:28 PM |
| Discussion Sort of DIY 2.4Ghz Spectrum Analyzer | village_idiot | DIY Electronics | 11 | Feb 23, 2008 11:55 AM |
| Discussion DIY +12dBi, increase the range of your rubber ducky 2.4Ghz antenna | dalbert02 | Aerial Photography | 1 | Jan 01, 2006 11:58 AM |
| Antenna for 2.4GHz video transmitter | Wile E | Power Systems | 7 | Sep 25, 2001 04:42 PM |
| 2.4Ghz xmit system for a small fortune | jas_Qfix | Electric Plane Talk | 28 | Jul 02, 2001 08:37 AM |