PybLITE1.0
- 2022/11/21 ステラマーチャンダイジング(Amazon)で¥3,800.-
- Flush 512KB、CPU: STM32f411RET6
ボードの表 | ボードの裏 |
---|---|
- 画像をクリックすると拡大します
- 添付ファイルから PybLITE10.pdf(KiCAD7)をダウンロード出来ます
PybLITE1.0 動作ログ
- 既に、MicroPython は実装されており、USBケーブルで、接続し TeraTerm で開く
- 2022/11/30 の記録
MicroPython v1.13 on 2020-09-02; PYBLITEv1.0 with STM32F411RE Type "help()" for more information. >>> help() Welcome to MicroPython! For online help please visit http://micropython.org/help/. Quick overview of commands for the board: pyb.info() -- print some general information pyb.delay(n) -- wait for n milliseconds pyb.millis() -- get number of milliseconds since hard reset pyb.Switch() -- create a switch object Switch methods: (), callback(f) pyb.LED(n) -- create an LED object for LED n (n=1,2,3,4) LED methods: on(), off(), toggle(), intensity(<n>) pyb.Pin(pin) -- get a pin, eg pyb.Pin('X1') pyb.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p Pin methods: init(..), value([v]), high(), low() pyb.ExtInt(pin, m, p, callback) -- create an external interrupt object pyb.ADC(pin) -- make an analog object from a pin ADC methods: read(), read_timed(buf, freq) pyb.DAC(port) -- make a DAC object DAC methods: triangle(freq), write(n), write_timed(buf, freq) pyb.RTC() -- make an RTC object; methods: datetime([val]) pyb.rng() -- get a 30-bit hardware random number pyb.Servo(n) -- create Servo object for servo n (n=1,2,3,4) Servo methods: calibration(..), angle([x, [t]]), speed([x, [t]]) pyb.Accel() -- create an Accelerometer object Accelerometer methods: x(), y(), z(), tilt(), filtered_xyz() Pins are numbered X1-X12, X17-X22, Y1-Y12, or by their MCU name Pin IO modes are: pyb.Pin.IN, pyb.Pin.OUT_PP, pyb.Pin.OUT_OD Pin pull modes are: pyb.Pin.PULL_NONE, pyb.Pin.PULL_UP, pyb.Pin.PULL_DOWN Additional serial bus objects: pyb.I2C(n), pyb.SPI(n), pyb.UART(n) Control commands: CTRL-A -- on a blank line, enter raw REPL mode CTRL-B -- on a blank line, enter normal REPL mode CTRL-C -- interrupt a running program CTRL-D -- on a blank line, do a soft reset of the board CTRL-E -- on a blank line, enter paste mode For further help on a specific object, type help(obj) For a list of available modules, type help('modules') >>>
- モジュール pyb を調べる
>>> import pyb >>> pyb.info() ID=4b004d00:03513431:34383038 S=96000000 H=96000000 P1=24000000 P2=48000000 _etext=806d798 _sidata=806d7a0 _sdata=20000000 _edata=2000001c _sbss=2000001c _ebss=2000627c _sstack=2001bff8 _estack=2001fff8 _ram_start=20000000 _heap_start=2000627c _heap_end=2001bff8 _ram_end=20020000 qstr: n_pool=1 n_qstr=3 n_str_data_bytes=28 n_total_bytes=124 GC: 87360 total 1616 : 85744 1=26 2=6 m=40 LFS free: 41472 bytes >>> >>> help(pyb.LED) object <class 'LED'> is of type type on -- <function> off -- <function> toggle -- <function> intensity -- <function> >>>
- LED を試してみる
>>> red = pyb.LED(1) >>> red.on() >>> red.toggle() >>> grn = pyb.LED(2) >>> grn.on() >>> grn.toggle() >>> ylw = pyb.LED(3) >>> ylw.on() >>> ylw.toggle() >>> blu = pyb.LED(4) >>> blu.on() >>> blu.toggle() >>>
Last modified
8 months ago
Last modified on Apr 13, 2024, 3:01:11 PM
Attachments (3)
- PybLite10.png (1.9 MB ) - added by 9 months ago.
- PybLite10b.png (2.2 MB ) - added by 9 months ago.
- PybLITE10.pdf (376.4 KB ) - added by 9 months ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.