Giter Site home page Giter Site logo

alphapi's Introduction

AlphaPi

注意!!AlphaPi 电路板的硬件版本和固件随时都在更新,这个项目的固件是比较老的版本,请一定要先提取自己板子上的固件版本,先做好备份!

官网:

http://lingxi.hetao101.com/alphapi

固件使用如下命令提取 4M flash:

~/Library/Arduino15/packages/esp32/tools/esptool_py/4.2.1/esptool -p /dev/cu.usbmodem101 read_flash 0 0x400000 flash_contents.bin

Disassemble .mpy files using:

$ micropython/tools/mpy-tool.py -d ./rootfs/control_board_v1.mpy  > ./rootfs/control_board_v1.mpy.txt
>>> import esp32
>>> esp32.Partition.find()
[<Partition type=0, subtype=0, address=65536, size=2031616, label=factory, encrypted=0>]
# flash_read:
esp.flash_read(byte_offset, length_or_buffer)¶

APIs and Docs

control_board_v1.mpy

Functions

  • control_board_v1.led_show_bytes(bytearray)

用 I2C 扩展芯片点亮 5x5 红色LED,参数是5个数字的bytearray。这个是同步接口。 bytearray([8, 0, 0, 0, 0]) 点亮第5行第1列的灯,bytearray([16, 0, 0, 0, 0]) 点亮第4行第1列的灯,同理,bytearray([128, 0, 0, 0, 0]) 点亮第1行第1列的灯,bytearray([255, 255, 255, 255, 255]) 点亮5x5所有的灯。

import control_board_v1
# 点亮最下面一行所有的灯
control_board_v1.led_show_bytes(bytearray([8, 8, 8, 8, 8]))
  • control_board_v1.led_show_bytes_async(bytearray) 同上,这个是异步接口。
import control_board_v1
control_board_v1.led_show_bytes_async(bytearray([9, 8, 0, 0, 0]))

Classes

  • control_board_v1.PlayRecordMission

Examples

  • 01 5X5 LED(OFFICAL METHODS)
  • 02 ACEL
  • 03 BUTTON
  • 04 5X5 LED(WITH SOURCE CODE)

GPIO对应

已知:
button a ————— GPIO 10
button b ————— GPIO 20
button c ————— GPIO 21
I2C(SC7A20国产三轴) ————— SDA 6 SCL 7
UART ————— TX 8 RX 9 baudrate=460800 板子上还有个国产MUC,主要通过UART通信实现音频录制播放、5x5 led的功能
未知:
P1 ————— GPIO5
P2 ————— GPIO4
到此alphapi的硬件基本挖掘完毕,通过螺丝柱供电这种方式确实第一次见。
TODO

alphapi's People

Contributors

eggfly avatar jd3096-mpy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.