Changes between Version 2 and Version 3 of GeeekPi


Ignore:
Timestamp:
Apr 13, 2024, 3:24:35 PM (8 months ago)
Author:
katta
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GeeekPi

    v2 v3  
    11[[PageOutline]]
    22
    3 == Geek Pi2040
     3== Geeek Pi2040
     4  * 2022/11/01 Amazon ¥3,799.- Raspberry Pi Pico 3枚とUSBケーブルがセット
    45
    56||[[Image(GeeekPiPico3Set.png, 200)]]||
    67
    78[KhoPyboard PyBoard一覧に戻る]
     9
     10== Geeek Pi2040 の動作ログ
     11
     12
     13{{{
     14>>> import sys
     15>>> sys.implementation
     16(name='micropython', version=(1, 19, 1), _machine='Raspberry Pi Pico with RP2040', _mpy=4102)
     17>>>
     18>>> help()
     19Welcome to MicroPython!
     20
     21For online help please visit https://micropython.org/help/.
     22
     23For access to the hardware use the 'machine' module.  RP2 specific commands
     24are in the 'rp2' module.
     25
     26Quick overview of some objects:
     27  machine.Pin(pin) -- get a pin, eg machine.Pin(0)
     28  machine.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p
     29    methods: init(..), value([v]), high(), low(), irq(handler)
     30  machine.ADC(pin) -- make an analog object from a pin
     31    methods: read_u16()
     32  machine.PWM(pin) -- make a PWM object from a pin
     33    methods: deinit(), freq([f]), duty_u16([d]), duty_ns([d])
     34  machine.I2C(id) -- create an I2C object (id=0,1)
     35    methods: readfrom(addr, buf, stop=True), writeto(addr, buf, stop=True)
     36             readfrom_mem(addr, memaddr, arg), writeto_mem(addr, memaddr, arg)
     37  machine.SPI(id, baudrate=1000000) -- create an SPI object (id=0,1)
     38    methods: read(nbytes, write=0x00), write(buf), write_readinto(wr_buf, rd_buf)
     39  machine.Timer(freq, callback) -- create a software timer object
     40    eg: machine.Timer(freq=1, callback=lambda t:print(t))
     41
     42Pins are numbered 0-29, and 26-29 have ADC capabilities
     43Pin IO modes are: Pin.IN, Pin.OUT, Pin.ALT
     44Pin pull modes are: Pin.PULL_UP, Pin.PULL_DOWN
     45
     46Useful control commands:
     47  CTRL-C -- interrupt a running program
     48  CTRL-D -- on a blank line, do a soft reset of the board
     49  CTRL-E -- on a blank line, enter paste mode
     50
     51For further help on a specific object, type help(obj)
     52For a list of available modules, type help('modules')
     53>>>
     54>>> help(machine.Pin)
     55object <class 'Pin'> is of type type
     56  init -- <function>
     57  value -- <function>
     58  low -- <function>
     59  high -- <function>
     60  off -- <function>
     61  on -- <function>
     62  toggle -- <function>
     63  irq -- <function>
     64  IN -- 0
     65  OUT -- 1
     66  OPEN_DRAIN -- 2
     67  ALT -- 3
     68  PULL_UP -- 1
     69  PULL_DOWN -- 2
     70  IRQ_RISING -- 8
     71  IRQ_FALLING -- 4
     72>>>
     73>>> help('modules')
     74__main__          framebuf          uasyncio/funcs    ujson
     75_boot             gc                uasyncio/lock     umachine
     76_boot_fat         math              uasyncio/stream   uos
     77_onewire          micropython       ubinascii         urandom
     78_rp2              neopixel          ucollections      ure
     79_thread           onewire           ucryptolib        uselect
     80_uasyncio         rp2               uctypes           ustruct
     81builtins          uarray            uerrno            usys
     82cmath             uasyncio/__init__ uhashlib          utime
     83dht               uasyncio/core     uheapq            uzlib
     84ds18x20           uasyncio/event    uio
     85Plus any modules on the filesystem
     86>>>
     87>>> help('rp2')
     88object rp2 is of type str
     89  encode -- <function>
     90  find -- <function>
     91  rfind -- <function>
     92  index -- <function>
     93  rindex -- <function>
     94  join -- <function>
     95  split -- <function>
     96  splitlines -- <function>
     97  rsplit -- <function>
     98  startswith -- <function>
     99  endswith -- <function>
     100  strip -- <function>
     101  lstrip -- <function>
     102  rstrip -- <function>
     103  format -- <function>
     104  replace -- <function>
     105  count -- <function>
     106  partition -- <function>
     107  rpartition -- <function>
     108  center -- <function>
     109  lower -- <function>
     110  upper -- <function>
     111  isspace -- <function>
     112  isalpha -- <function>
     113  isdigit -- <function>
     114  isupper -- <function>
     115  islower -- <function>
     116>>>
     117}}}
     118
     119[KhoPyboard PyBoard一覧に戻る]