制造商零件编号 K016-P
M5STICKC PLUS ESP32-PICO IOT KIT
M5Stack Technology Co., Ltd.
所订产品一般在 7-10个工作日 内送达中国,具体时间取决于收货地点。
最低订购金额为人民币 300 元,顺丰快递免运费配送。
当用人民币下单时,按照国际贸易条款 DDP(DigiKey 支付关税、海关费用和当地税款)方式结算。
电汇预付
更多来自全授权合作伙伴的产品
下单后,从合作伙伴发货平均需要时间 1-3 天,也可能产生额外运费。可能另外收取运费。 实际发货时间请留意产品详情页、购物车和结账页面上的说明。
国际贸易结算方式:CPT(交货时支付关税、海关费用和适用 VAT/应付税金)
有关详情,请访问帮助和支持
License: General Public License Bluetooth / BLE Wifi Arduino M5Stack M5Stick
* Thanks for the source code and project information provided by @Ahork
Software apps and online services
Library ESP32-BLE-Keyboard
Create a wireless Barcode scanner for your ISBN books (in the Zotero or other).
You can read the ISBN of book with camera on StickV.
Look the isbn with M5SctickV and the code will be typed on the keyboard.
It uses HID Bleutooth.
Install a ESP32-BLE-Keyboard library in the Arduion IDE:
M5StickC
M5StickV
Warning:
The first time you add in windows parameter add ESP 32 BLE Keyboard.
Also,
Add code for ATOMIC QR-CODE and AZERTY keyboard, only use the ATOM QR CODE in IDE Arduino:
Code
谢谢!
敬请关注收件箱中的 DigiKey 新闻与更新!
请输入电子邮件地址
#include <M5StickC.h>
#include <BleKeyboard.h>
//reception M5StickV
HardwareSerial serial_ext(2);
//Connect HID Bluetooth
BleKeyboard bleKeyboard;
void setup() {
M5.begin();
M5.Lcd.setRotation(3);
M5.Lcd.fillScreen(BLACK);
M5.Lcd.setCursor(0, 0);
M5.Lcd.setTextSize(2);
M5.Lcd.println("GO");
bleKeyboard.begin();
// Connect M5StickV
pinMode(32, OUTPUT);
pinMode(33, INPUT);
serial_ext.begin(115200, SERIAL_8N1, 32, 33);
}
// for IBSN (Number)
void loop() {
if(bleKeyboard.isConnected()) {
if ( serial_ext.available() > 0 ) {
bleKeyboard.press(KEY_LEFT_SHIFT );
String str = serial_ext.readStringUntil('\n');
bleKeyboard.print(str);
bleKeyboard.releaseAll();
M5.Lcd.fillScreen(BLACK);
M5.Lcd.setCursor(0, 0);
M5.Lcd.println(str);
}
}
}
/*Press button to scan, serial monitor will print information*/
#include <M5Atom.h>
#include <BleKeyboard.h>
String AltGrazerty="~#{[|`\\^@#]}";
String shiftazerty="QBCDEFGHIJKL?NOPARSTUVZXYW1234567890 Q+QQQQM%Q./Q>";
String azerty="qbcdefghijkl,noparstuvzxyw&q\"'(-q_qq )=q$q*mqq;:!<";
const byte scancode[] = {4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,44,45,46,47,48,49,50,51,52,53,54,55,56,100};
const boolean AZERTY = true;
BleKeyboard bleKeyboard;
#define TRIG 23
#define DLED 33
const int tempo=10;
void Keyfr(const String &Texte){
int j = -1;
for (unsigned int i=0; i< Texte.length(); i++){
delay(tempo);
char c = Texte.charAt(i);
if (c=='\t'){
bleKeyboard.write(KEY_TAB);
}
int index = azerty.indexOf(c);
if (index>-1){
j = scancode[index]+136;
bleKeyboard.write(j);
} else{
index = shiftazerty.indexOf(c);
if (index>-1){
j = scancode[index]+136;
bleKeyboard.press(KEY_LEFT_SHIFT);
bleKeyboard.press(j);
bleKeyboard.releaseAll();
}else {
index = AltGrazerty.indexOf(c);
if (index>-1){
j = scancode[index+27]+136;
bleKeyboard.press(KEY_LEFT_CTRL);
bleKeyboard.press(KEY_LEFT_ALT);
bleKeyboard.write(j);
bleKeyboard.releaseAll();
if (index==0 || index==7){
// Traitement spécial pour ce caractère ~ et ^ qui sont des deads keys
// ce qui n'est pas le cas sur les clavier qwerty
// on le tape une seconde fois puis on fait un Retour Arrière.
bleKeyboard.press(KEY_LEFT_CTRL);
bleKeyboard.press(KEY_LEFT_ALT);
bleKeyboard.write(j);
bleKeyboard.releaseAll();
bleKeyboard.write(KEY_BACKSPACE);
}
}
}
}
}
}
void Keyfrln(const String &Texte){
Keyfr(Texte);
bleKeyboard.write(KEY_RETURN);
}
void setup() {
bleKeyboard.begin();
M5.begin(false, false, true);
Serial.begin(9600);
Serial2.begin(9600, SERIAL_8N1, 22, 19);
M5.dis.drawpix(0, 0x00f000);
pinMode(TRIG, OUTPUT);
pinMode(DLED, INPUT);
digitalWrite(TRIG, HIGH);
}
void loop() {
M5.update();
if(digitalRead(39) == LOW){
digitalWrite(TRIG, LOW);
}else {
digitalWrite(TRIG, HIGH);
}
if(digitalRead(DLED) == HIGH){
while(Serial2.available() > 0){
char ch = Serial2.read();
if(bleKeyboard.isConnected())
{
String phrase;
phrase = String(phrase + ch);
if (AZERTY) {
Keyfr(phrase);
Serial.print(phrase);
}
else
{
bleKeyboard.print(phrase );
bleKeyboard.releaseAll();
}
}
}
}
}
import sensor
import image
import lcd
import time
from machine import I2C,UART
from fpioa_manager import fm
#uart initial
fm.register(35, fm.fpioa.UART2_TX, force=True)
fm.register(34, fm.fpioa.UART2_RX, force=True)
uart_Port = UART(UART.UART2, 115200,8,0,0, timeout=1000, read_buf_len= 4096)
clock = time.clock()
lcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.set_vflip(1)
sensor.set_hmirror(1)
sensor.run(1)
sensor.skip_frames(20)
while True:
clock.tick()
img = sensor.snapshot()
res = img.find_barcodes()
fps =clock.fps()
if len(res) > 0:
data = res[0].payload()
print(data)
uart_Port.write(data)
time.sleep(2)
lcd.display(img)