知识点:什么是掌控板?
掌控板是一块普及STEAM创客教育、人工智能教育、机器人编程教育的开源智能硬件。它集成ESP-32高性能双核芯片,支持WiFi和蓝牙双模通信,可作为物联网节点,实现物联网应用。同时掌控板上集成了OLED显示屏、RGB灯、加速度计、麦克风、光线传感器、蜂鸣器、按键开关、触摸开关、金手指外部拓展接口,支持图形化及MicroPython代码编程,可实现智能机器人、创客智造作品等智能控制类应用。
掌控板硬件特性:
ESP-32主控
处理器:Tensilica LX6双核处理器(一核处理高速连接;一核独立应用开发)
主频:高达240MHz的时钟频率
SRAM:520KB
Flash:8MB
Wi-Fi标准:FCC/CE/TELEC/KCC
Wi-Fi协议:802.11 b/g/n/d/e/i/k/r (802.11n,速度高达150 Mbps),A-MPDU和A-MSDU聚合,支持0.4us防护间隔
频率范围:2.4~2.5 GHz
蓝牙协议:符合蓝牙v4.2 BR/EDR和BLE标准
蓝牙音频:CVSD和SBC音频低功耗:10uA
供电方式:Micro USB供电
工作电压:3.3V
最大工作电流:200mA
最大负载电流:1000mA
掌控板载
三轴加速度计MSA300,测量范围:±2/4/8/16G
地磁传感器MMC5983MA,测量范围:±8 Gauss;精度0.4mGz,电子罗盘误差±0.5°
光线传感器
麦克风
3 颗全彩ws2812灯珠
1.3英寸OLED显示屏,支持16*16字符显示,分辨率128x64
无源蜂鸣器
支持2个物理按键(A/B)、6个触摸按键
支持1路鳄鱼夹接口,可方便接入各种阻性传感器
拓展接口
20通道数字I/O, (其中支持12路PWM,6路触摸输入)
5通道12bit模拟输入ADC,P0~P4
1路的外部输入鳄鱼夹接口:EXT/GND
支持I2C、UART、SPI通讯协议
4、OLED显示外部图片
OLED屏幕只能显示颜色深度为1或者就是黑白模式的bmp格式,可以使用Photoshop、“画图”或者其他图片显示软件进行转换。转换好格式的图片需要使用取模工具对图片进行取模,转换的图片大小应该为128*64,也就是掌控板屏幕的大小。所选的图片线条要分明,且颜色不能太过丰富。
(1)选择一张图片
用在线PS打开图片,这里使用 https://www.uupoop.com/
(3)调整为128*64规格,另存为bmp格式
(4)安装小图片取模工具Image2Lcd
下载地址:
http://7dx.0098118.com/wwb5/image2lcd32.zip
(5)去头去尾要中间(取模数据)
(6)将复制的16进制图像数据粘贴在下列指令的空格处。
描述:OLED绘制16进制数组图像。将16进制数据转换成图像显示在oled屏幕的指定位置处。尝试将程序搭建好,将图片显示出来。
mPython 图形编程
#MicroPython动手做(16)——掌控板之图片图像显示
#OLED显示外部图片
from mpython import *
import time
while True:
oled.fill(0)
oled.Bitmap(0, 0, bytearray([0XFF,0XFF,0XFF,0XFF,0X00,0X0F,0XFF,0XFF,0XFF,0XFF,0XF0,0X00,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X00,0X1F,0XFF,0XFF,0XFF,0XFF,0XF0,0X00,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X00,0X3C,0X00,0X00,0X00,0X00,0X70,0X00,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X00,0X7C,0X00,0X00,0X00,0X00,0X70,0X00,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X00,0XEC,0X03,0XFF,0XFF,0XFF,0XFF,0XFC,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X01,0XCC,0X07,0XFF,0XFF,0XFF,0XFF,0XFE,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X03,0X8C,0X06,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X07,0X0C,0X06,0X00,0X00,0X00,0X00,0X03,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X0E,0X0C,0X06,0X7F,0X87,0X06,0X3F,0XC3,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0X1C,0X0C,0X06,0X7F,0XC7,0X8E,0X7F,0XE3,0XFF,0X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XFF,0XFF,]), 128, 64, 1)
oled.show()
time.sleep(1)
oled.fill(0)
oled.Bitmap(0, 0, bytearray([0X00,0X00,0X00,0X00,0XFF,0XF0,0X00,0X00,0X00,0X00,0X0F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFF,0XE0,0X00,0X00,0X00,0X00,0X0F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFF,0XC3,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFF,0X83,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFF,0X13,0XFC,0X00,0X00,0X00,0X00,0X03,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFE,0X33,0XF8,0X00,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XFC,0X73,0XF9,0XFF,0XFF,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XF8,0XF3,0XF9,0XFF,0XFF,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XF1,0XF3,0XF9,0X80,0X78,0XF9,0XC0,0X3C,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XE3,0XF3,0XF9,0X80,0X38,0X71,0X80,0X1C,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0XC7,0XF3,0XF9,0X9F,0X18,0X61,0X8F,0X8C,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X8F,0XF3,0XF9,0X9F,0X98,0X01,0X8F,0XCC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X00,0X03,0XF9,0X9F,0X99,0X09,0X8F,0XCC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X00,0X03,0XF9,0X80,0X19,0X99,0X80,0X1C,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XF9,0X80,0X39,0XD9,0X80,0X1C,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XF9,0X9F,0X19,0XF9,0X8F,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XBF,0XF9,0X9F,0X99,0XF9,0X8F,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X3F,0XF9,0X9F,0X99,0XF9,0X8F,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3B,0XBF,0XF9,0X80,0X19,0XF9,0X8F,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XF9,0X80,0X39,0XF9,0X8F,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XF9,0X80,0XF9,0XFD,0XDF,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XF9,0XFF,0XFF,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XF9,0XFF,0XFF,0XFF,0XFF,0XF8,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XF8,0X00,0X00,0X00,0X00,0X01,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XFE,0X00,0X00,0X00,0X00,0X03,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X30,0X00,0X00,0X00,0X00,0X01,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X30,0X00,0X00,0X00,0X00,0X01,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XFF,0XFF,0XFF,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XFC,0X07,0XFF,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XF8,0X01,0XFF,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XE1,0XF8,0XFF,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XC7,0XFC,0X7F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XCF,0XFE,0X3F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X8F,0XFF,0X3F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X9F,0XFF,0X1F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X9F,0XFF,0X9F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X1F,0XFF,0X9F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X1F,0XFF,0X9F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X9F,0XFF,0X9F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X9F,0XFF,0X9F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X9F,0XFF,0X3F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XCF,0XFE,0X3F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XC7,0XFE,0X7F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0XE3,0XF8,0X7F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFF,0X80,0X00,0X3F,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XFC,0X00,0X00,0X07,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XF8,0X23,0XF8,0XC1,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XF1,0XF3,0XF8,0XF8,0XF9,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XE3,0XF1,0XF1,0XFC,0X79,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XC7,0XF8,0X03,0XFE,0X79,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0XCF,0XFC,0X07,0XFE,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X8F,0XFF,0X9F,0XFF,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X9F,0XFF,0XFF,0XFF,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X9E,0X7F,0XFF,0XCF,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X9E,0X7F,0XFF,0XCF,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X33,0X9E,0X3F,0XFF,0XCF,0X39,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X30,0X00,0X00,0X00,0X00,0X01,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X30,0X00,0X00,0X00,0X00,0X01,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X3F,0XFF,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0X00,0X00,0X00,0X00, 0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0X00,0X00,0X00,0X00,]), 128, 64, 1)
oled.show()
time.sleep(1)
5、尝试转换显示一张网络图片
在线转换为bmp格式
小图片取模工具Image2Lcd来取模(通过调整亮度选取合适图案)
#MicroPython动手做(16)——掌控板之图片图像显示
#二只小象
from mpython import *
while True:
oled.fill(0)
oled.Bitmap(0, 0, bytearray([0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XBF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF, 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X0F,0XFF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