Pyb.ExtInt(pin, m, p, callback) - create an external interrupt object Pin methods: init(.), value(), high(), low() Pyb.Pin(pin, m, ) - get a pin and configure it for IO mode m, pull mode p Pyb.Pin(pin) - get a pin, eg pyb.Pin( 'X1') LED methods: on(), off(), toggle(), intensity() Pyb.LED(n) - create an LED object for LED n (n=1,2,3,4) Pyb.millis() - get number of milliseconds since hard reset
Pyb.info() - print some general information Quick overview of commands for the board: Terminal will be reused by tasks, press any key to close it. Target halted due to debug-request, current mode: Thread Srst_only separate srst_nogate srst_open_drain connect_deassert_srst PROGRAM: 9.3% (used 48956 bytes from 524288 bytes)ĪVAILABLE: blackmagic, jlink, mbed, stlink pio/build/nucleo_f446re/firmware.elfĪdvanced Memory Usage is available via "PlatformIO Home > Project Inspect"ĭATA: 3.1% (used 4000 bytes from 131072 bytes) LDF Modes: Finder ~ chain, Compatibility ~ softĬhecking size. HARDWARE: STM32F446RET6 180MHz, 128KB RAM, 512KB FlashĭEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink) > Executing task in folder F446RE_mbed_01: platformio run -target upload ST Nucleo F446RE # Use 16bit greyscale mode # LED brightness 0x0000-0xFFFF # Use 14bit greyscale mode # LED brightness 0x000-0x3FFF Ledbar._write16( 0x0000) # unused channel, required # Use 12bit greyscale mode # LED brightness 0x000-0xFFF Ledbar._write16( 0x00) # unused channel, required # Use 8bit greyscale mode (default) # LED brightness 0x00-0xFF # walk through all possible LED combinations for i in range( 1024): # cycle through LEDS with various brightnesses from time import sleep_ms # reverse orientation, first LED is greenīuf = b'\x00\xff\x00\xff\x00\xff\x00\xff\x00\xff'īuf = bytearray()īuf =
Ledbar = MY9221(Pin( 'B4'), Pin( 'B10')) # Digital I/O slot#5(D5,D6) # all LEDS on, full brightness # use A1 for analog input (Nucleo_F446RE)ī = 4275 # v1.2 (B value of the thermistor) # B = 3975 # v1.0 (B value of the thermistor)