Skip to content

Commit ec9c277

Browse files
committed
esp32/help: Update help text.
1 parent c2de319 commit ec9c277

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

esp32/help.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131
#include "lib/utils/pyhelp.h"
3232

3333
STATIC const char *help_text =
34-
"Welcome to MicroPython!\n"
34+
"Welcome to MicroPython on the ESP32!\n"
3535
"\n"
36-
"For online docs please visit http://docs.micropython.org/en/latest/esp8266/ .\n"
37-
"For diagnostic information to include in bug reports execute 'import port_diag'.\n"
36+
"For generic online docs please visit http://docs.micropython.org/\n"
3837
"\n"
39-
"Basic WiFi configuration:\n"
38+
"For access to the hardware use the 'machine' module:\n"
4039
"\n"
41-
"import network\n"
42-
"sta_if = network.WLAN(network.STA_IF); sta_if.active(True)\n"
43-
"sta_if.scan() # Scan for available access points\n"
44-
"sta_if.connect(\"<AP_name>\", \"<password>\") # Connect to an AP\n"
45-
"sta_if.isconnected() # Check for successful connection\n"
46-
"# Change name/password of ESP8266's AP:\n"
47-
"ap_if = network.WLAN(network.AP_IF)\n"
48-
"ap_if.config(essid=\"<AP_NAME>\", authmode=network.AUTH_WPA_WPA2_PSK, password=\"<password>\")\n"
40+
"import machine\n"
41+
"pin12 = machine.Pin(12, machine.Pin.OUT)\n"
42+
"pin12.value(1)\n"
43+
"pin13 = machine.Pin(13, machine.Pin.IN, machine.Pin.PULL_UP)\n"
44+
"print(pin13.value())\n"
45+
"i2c = machine.I2C(scl=machine.Pin(21), sda=machine.Pin(22))\n"
46+
"i2c.scan()\n"
47+
"i2c.writeto(addr, b'1234')\n"
48+
"i2c.readfrom(addr, 4)\n"
4949
"\n"
5050
"Control commands:\n"
5151
" CTRL-A -- on a blank line, enter raw REPL mode\n"
@@ -60,7 +60,7 @@ STATIC const char *help_text =
6060
STATIC mp_obj_t builtin_help(uint n_args, const mp_obj_t *args) {
6161
if (n_args == 0) {
6262
// print a general help message
63-
printf("%s", help_text);
63+
mp_printf(MP_PYTHON_PRINTER, "%s", help_text);
6464

6565
} else {
6666
// try to print something sensible about the given object

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy