@@ -14,27 +14,36 @@ STATIC const char *help_text =
1414"Specific commands for the board:\n"
1515" pyb.info() -- print some general information\n"
1616" pyb.gc() -- run the garbage collector\n"
17- " pyb.repl_info(< val> ) -- enable/disable printing of info after each command\n"
18- " pyb.delay(<n>) -- wait for n milliseconds\n"
19- " pyb.udelay(<n>) -- wait for n microseconds\n"
17+ " pyb.repl_info(val) -- enable/disable printing of info after each command\n"
18+ " pyb.delay(n) -- wait for n milliseconds\n"
19+ " pyb.udelay(n) -- wait for n microseconds\n"
2020" pyb.switch() -- return True/False if switch pressed or not\n"
21- " pyb.Led(<n>) -- create Led object for LED n (n=1,2,3,4)\n"
21+ " pyb.switch(f) -- call the given function when the switch is pressed\n"
22+ " pyb.Led(n) -- create Led object for LED n (n=1,2,3,4)\n"
2223" Led methods: on(), off(), toggle(), intensity(<n>)\n"
23- " pyb.Servo(<n>) -- create Servo object for servo n (n=1,2,3,4)\n"
24- " Servo methods: angle(<x> )\n"
24+ " pyb.Servo(n) -- create Servo object for servo n (n=1,2,3,4)\n"
25+ " Servo methods: calibrate(...), pulse_width([p]), angle([x, [t]]), speed([x, [t]] )\n"
2526" pyb.Accel() -- create an Accelerometer object\n"
26- " Accelerometer methods: x(), y(), z(), tilt()\n"
27+ " Accelerometer methods: x(), y(), z(), tilt(), filtered_xyz() \n"
2728" pyb.rng() -- get a 30-bit hardware random number\n"
28- " pyb.gpio(<port>) -- get port value (port='A4' for example)\n"
29- " pyb.gpio(<port>, <val>) -- set port value, True or False, 1 or 0\n"
30- " pyb.ADC(<port>) -- make an analog port object (port='C0' for example)\n"
29+ " pyb.gpio_in(port, [m]) -- set IO port to input, mode m\n"
30+ " pyb.gpio_out(port, [m]) -- set IO port to output, mode m\n"
31+ " pyb.gpio(port) -- get digital port value\n"
32+ " pyb.gpio(port, val) -- set digital port value, True or False, 1 or 0\n"
33+ " pyb.ADC(port) -- make an analog port object\n"
3134" ADC methods: read()\n"
3235"\n"
36+ "Ports are numbered X1-X12, X17-X22, Y1-Y12, or by their MCU name\n"
37+ "Port input modes are: pyb.PULL_NONE, pyb.PULL_UP, pyb.PULL_DOWN\n"
38+ "Port output modes are: pyb.PUSH_PULL, pyb.OPEN_DRAIN\n"
39+ "\n"
3340"Control commands:\n"
3441" CTRL-A -- on a blank line, enter raw REPL mode\n"
3542" CTRL-B -- on a blank line, enter normal REPL mode\n"
3643" CTRL-C -- interrupt a running program\n"
3744" CTRL-D -- on a blank line, do a soft reset of the board\n"
45+ "\n"
46+ "For further help on a specific object, type help(obj)\n"
3847;
3948
4049STATIC void pyb_help_print_info_about_object (mp_obj_t name_o , mp_obj_t value ) {
0 commit comments