parallaxinc / cyberbot

Firmware, library, and loader code for cyberbot hardware
MIT License
8 stars 0 forks source link

Allow for non-API commands? #7

Open MatzElectronics opened 5 years ago

MatzElectronics commented 5 years ago

To lighten the API a bit, I'm suggesting that we take lesser used function calls, and instead expose the send_c function (and rename it back to send_command), which would allow users to a function on the cyber:bot using a code.

For example, we could get rid of bot(pin).servo_ramping(8) where 8 is the ramping value and instead use bot(pin).send_command(27, arg1=8) where 8 is the ramping value and 27 is the command for setting the ramping value.

If we did this for servo_ramping, servo_set (using microseconds), and whatever command we use for setting PWM frequency, and possibly others...?