制造商零件编号 K006-V27
M5GO IOT STARTER KIT V2.7
M5Stack Technology Co., Ltd.
所订产品一般在 7-10个工作日 内送达中国,具体时间取决于收货地点。
最低订购金额为人民币 300 元,顺丰快递免运费配送。
当用人民币下单时,按照国际贸易条款 DDP(DigiKey 支付关税、海关费用和当地税款)方式结算。
电汇预付
更多来自全授权合作伙伴的产品
下单后,从合作伙伴发货平均需要时间 1-3 天,也可能产生额外运费。可能另外收取运费。 实际发货时间请留意产品详情页、购物车和结账页面上的说明。
国际贸易结算方式:CPT(交货时支付关税、海关费用和适用 VAT/应付税金)
有关详情,请访问帮助和支持
License: General Public License Bluetooth / BLE Displays Wifi Arduino M5Stack ESP32
Thanks for the source code and project information provided by @lukas Maximus
Things used in this project
Hardware components
M5Stack M5GO Lite IoT Development Board Kit×1
Software apps and online services
Arduino IDE
Have you ever wondered how your plants are feeling? This simple Arduino sketch helps you display the status of your plants using an M5stack and the earth sensor.
It uses the awesome avatar library for M5Stack by M5Stack user shinya ishikawa here https://github.com/meganetaaan/m5stack-avatar
Schematics
Connect the earth sensor to port B
谢谢!
敬请关注收件箱中的 DigiKey 新闻与更新!
请输入电子邮件地址
#include <M5Stack.h>
#include <Avatar.h>
using namespace m5avatar;
Avatar avatar;
const Expression expressions[] = {
Expression::Angry,
Expression::Sleepy,
Expression::Happy,
Expression::Sad,
Expression::Doubt,
Expression::Neutral
};
const int expressionsSize = sizeof(expressions) / sizeof(Expression);
int idx = 0;
void setup()
{
M5.begin();
M5.Lcd.setBrightness(30);
M5.Lcd.clear();
avatar.init();
avatar.setExpression(expressions[idx]);
idx = 0;
}
void loop()
{
int adc = analogRead(36);
adc = map(adc, 4095, 0, 0, 255);
M5.update();
if (adc <=5)
{
avatar.setExpression(expressions[idx]);
idx = 3;
}
else if (adc > 10 && adc < 40)
{
avatar.setExpression(expressions[idx]);
idx = 2;
}
Serial.println(adc);
delay(2);
}