The title is just about one feature I've added, but there are a lot of new features, so many in fact I may forget about some.
I have been having so much fun adding device features I have still not touched the interpreter.
I will not list interpreter commands here as there are no new ones. But I do intend to make many or all of these system commands accessible from the interpreter.
A picture of the browser tool:

Below is the list of all system commands up to this point.
Pico PicoW Device Specific Commands:
s.w: If this command is run like this, and no ssid and password is currently set, it will scan for networks, then check if there are any saved networks that are available. if so it will automatically connect. If there is already a ssid and password set, it will try that first.
- s.ws: Scans for available wifi networks
- s.wc<n>: Connect to network "n" from scanned list. Acts the same as "s.w" if no argument provided.
- s.wl: Display the scanned list of networks on screen
- s.wx: Turn off wifi module
- s.wa: Create a WiFi AP, prompts user for ssid and password.
s.s: Creates a webserver, outputs IP address of server to screen. Webserver has a text area field that programs can be written into. If server receives program data, it replaces all the html characters with appropriate characters, and outputs it to screen. As of now it automatically appends to programs list. I will make this optional in future. As well add option for executing program immediately. Entering "end" into browser text area will shut down server.
s.g: Currently running this as is will connect to "https://g0730n.com" and output "success" if it receives a 200 code back.
- s.g<url>: Currently works the same as above, except any url can be fetched: "s.ghackaday.io"
- s.gt: Fetches time from NTP server, updates system clock.
- s.gw: Fetches weather data from API, saves data to text file as it is good for 48 hrs.
s.t: Displays current date and time
- s.ta: Non functional at moment, but will be used for alarms and timers.
s.c: Displays weather graph of saved weather data.
s.r: Not sure if is needed... Shuts down second core that scans keys, does a machine reset. Was having issues with connecting in Thonny so this was an attempt to deal with that. I did find a method that worked. So I dont think this is needed. But I will use this in future to do a reboot.
s.z: Device sleep command, called as is without arguments, device will turn off oled, wifi, and enter deepsleep indefinitely. Pressing ESC button wakes device. RTC time does not increment in this mode. I have not tested yet, but this mode should only use 1-2mA of power.
- s.z<n>: Turns off screen and WiFi as above, calls "time.sleep_ms(n)", n being 0-70 minutes. Will be used in alarm and timer modes in future. This method of sleep does not save a ton of power, but better than nothing. Drops machine.freq() to 20mhz before entering this sleep mode, then goes back to whatever it was before after finishing the sleep cycle.
s.f<n>: Set the machine frequency. n being 20-250(mhz)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.