machine
🟠 means “not implemented yet”
- Battery() 🟠
Sensing battery power.
- level() 🟠
- Returns
the current battery level as a percentage
- Camera() 🟠
Controlling feeds from the camera.
- capture() 🟠
Sends the last captured image over Bluetooth
- stream() 🟠
Starts streaming images over Bluetooth. Because Bluetooth is involved, this will have a low frame rate.
- stop() 🟠
Stops any ongoing image stream or capture currently in progress
- Display() 🟠
Drawing to the display.
- show(framebuffer) 🟠
Pushes a framebuffer object to the FPGA for drawing onto the display
- class machine.FPGA
Communication with the FPGA.
- download() 🟠
Downloads and reboots the FPGA with the bitstream from Bluetooth. Automatically powers up the FPGA if it was powered down.
- spi_read()
Not implemented, see spi_write() below.
- status() 🟠
- Returns
the current status of the FPGA
- Microphone() 🟠
Controlling feeds fromthe microphone.
- stream() 🟠
Starts streaming audio data over Bluetooth
- stop() 🟠
Stops any ongoing audio stream
- Power() 🟠
Controlling general power.
- hibernate(enable) 🟠
Enables or disables all the high power devices. Networking remains active. Upon re-enabling the FPGA will remain in reset until booted using FPGA.boot()
- reset() 🟠
Resets the device
- reset_cause() 🟠
- Returns
the reason for the previous reset or startup state
- shutdown(timeout) 🟠
Places the device into deep-sleep and powers down all high power devices. If a timeout is given, the device will wake up again after that many seconds, otherwise the device will only wake up upon inserting, and removing from the case. Upon wakeup, the device will reset, and the cause can be seen using the Power.reset_cause() function.
- Timer(id, period, callback, oneshot) 🟠
Creates a new Timer object on timer id with the period in milliseconds and a given callback handler. The oneshot value can optionally be set to true if only a single trigger is required. By default the timer is repeating
- value() 🟠
- Returns
the current count value of the timer in milliseconds
- deinit() 🟠
De-initializes the timer and stops any callbacks
- Touch(callback) 🟠
- Parameters
callback() (function) –
Setting up touch event callbacks
- mac_address() 🟠
- Returns
the 48bit MAC address of the device as a 17 character string. Each byte is delimited with a colon
- update(start) 🟠
Checks for firmware updates and returns True if it is available. If start is set to True, the update process is begun, and the device will enter the bootloader state