|
|
@ -21,21 +21,20 @@ STATIC const char *help_text = |
|
|
|
" pyb.switch(f) -- call the given function when the switch is pressed\n" |
|
|
|
" pyb.Led(n) -- create Led object for LED n (n=1,2,3,4)\n" |
|
|
|
" Led methods: on(), off(), toggle(), intensity(<n>)\n" |
|
|
|
" pyb.Pin(pin) -- get a pin\n" |
|
|
|
" pyb.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p\n" |
|
|
|
" Pin methods: value([v]), high(), low()\n" |
|
|
|
" pyb.Servo(n) -- create Servo object for servo n (n=1,2,3,4)\n" |
|
|
|
" Servo methods: calibrate(...), pulse_width([p]), angle([x, [t]]), speed([x, [t]])\n" |
|
|
|
" pyb.Accel() -- create an Accelerometer object\n" |
|
|
|
" Accelerometer methods: x(), y(), z(), tilt(), filtered_xyz()\n" |
|
|
|
" pyb.rng() -- get a 30-bit hardware random number\n" |
|
|
|
" pyb.gpio_in(port, [m]) -- set IO port to input, mode m\n" |
|
|
|
" pyb.gpio_out(port, [m]) -- set IO port to output, mode m\n" |
|
|
|
" pyb.gpio(port) -- get digital port value\n" |
|
|
|
" pyb.gpio(port, val) -- set digital port value, True or False, 1 or 0\n" |
|
|
|
" pyb.ADC(port) -- make an analog port object\n" |
|
|
|
" ADC methods: read()\n" |
|
|
|
"\n" |
|
|
|
"Ports are numbered X1-X12, X17-X22, Y1-Y12, or by their MCU name\n" |
|
|
|
"Port input modes are: pyb.PULL_NONE, pyb.PULL_UP, pyb.PULL_DOWN\n" |
|
|
|
"Port output modes are: pyb.PUSH_PULL, pyb.OPEN_DRAIN\n" |
|
|
|
"Port IO modes are: pyb.Pin.IN, pyb.Pin.OUT_PP, pyb.Pin.OUT_OD\n" |
|
|
|
"Port pull modes are: pyb.Pin.PULL_NONE, pyb.Pin.PULL_UP, pyb.Pin.PULL_DOWN\n" |
|
|
|
"\n" |
|
|
|
"Control commands:\n" |
|
|
|
" CTRL-A -- on a blank line, enter raw REPL mode\n" |
|
|
|