arduino

图形化编程娱乐于教,Kittenblock arduino实例解读,红外线发送

帅比萌擦擦* 提交于 2020-04-05 17:25:54
跟很多学生聊过,很多学生不是不努力,只是找不到感觉。有一点不可否认,同样在一个教室上课,同样是一个老师讲授,学习效果迥然不同。关键的问题在于,带入感,我能给出的建议,就是咬咬牙,坚持住,没有学不会的知识。会陆续分享图形化编程的经验,希望能够做成一个专题。如果您觉得有用,就给点个赞吧。涉及的软件包括 Kittenblock 、 arduino。 程序解读:传感器红外线发送 知识点:红外线发送,连接arduino板, 执行器,结构 , 传感器 重点:红外线发送字符串 涉及的软件: Kittenblock、arduino 。 #include <Arduino.h> #include <IRremote.h> int x; IRsend irsend; void setup(){ } void loop(){ irsend.sendNEC("I LOVE", 32); delay(1*1000); } 来源: https://www.cnblogs.com/ztg1/p/12635742.html

图形化编程娱乐于教,Kittenblock arduino实例解读,红外线发送

陌路散爱 提交于 2020-04-05 17:25:02
跟很多学生聊过,很多学生不是不努力,只是找不到感觉。有一点不可否认,同样在一个教室上课,同样是一个老师讲授,学习效果迥然不同。关键的问题在于,带入感,我能给出的建议,就是咬咬牙,坚持住,没有学不会的知识。会陆续分享图形化编程的经验,希望能够做成一个专题。如果您觉得有用,就给点个赞吧。涉及的软件包括 Kittenblock 、 arduino。 程序解读:传感器红外线发送 知识点:红外线发送,连接arduino板, 执行器,结构 , 传感器 重点:红外线发送字符串 涉及的软件: Kittenblock、arduino 。 #include <Arduino.h> #include <IRremote.h> int x; IRsend irsend; void setup(){ } void loop(){ irsend.sendNEC("I LOVE", 32); delay(1*1000); } 来源: https://www.cnblogs.com/ztg1/p/12635743.html

图形化编程娱乐于教,Kittenblock arduino实例解读,红外线接收

南楼画角 提交于 2020-04-05 17:22:23
跟很多学生聊过,很多学生不是不努力,只是找不到感觉。有一点不可否认,同样在一个教室上课,同样是一个老师讲授,学习效果迥然不同。关键的问题在于,带入感,我能给出的建议,就是咬咬牙,坚持住,没有学不会的知识。会陆续分享图形化编程的经验,希望能够做成一个专题。如果您觉得有用,就给点个赞吧。涉及的软件包括 Kittenblock 、 arduino。 程序解读:传感器红外线接收 知识点:红外线接收,连接arduino板, 执行器,结构 , 传感器 重点:红外线接收 涉及的软件: Kittenblock、arduino 。 #include <Arduino.h> #include <IRremote.h> int x; IRrecv irrecv(2); decode_results results; void setup(){ Serial.begin(115200); irrecv.enableIRIn(); } void loop(){ if (irrecv.decode(&results)) { if (results.value != 0xFFFFFFFF) { Serial.println(String("IR") + String("=") + String(String(results.value, HEX))); } irrecv.resume(); } } 来源:

图形化编程娱乐于教,Kittenblock arduino实例,RGB灯带

荒凉一梦 提交于 2020-04-04 09:47:59
跟很多学生聊过,很多学生不是不努力,只是找不到感觉。有一点不可否认,同样在一个教室上课,同样是一个老师讲授,学习效果迥然不同。关键的问题在于,带入感,我能给出的建议,就是咬咬牙,坚持住,没有学不会的知识。会陆续分享图形化编程的经验,希望能够做成一个专题。如果您觉得有用,就给点个赞吧。涉及的软件包括 Kittenblock 、 arduino。 程序解读: 引脚 4 连接灯带,控制 RGB 灯带,循环 30 次,用变量控制像素 知识点:灯带 , arduino , 执行器,结构 重点:显示模块, RGB 是指红绿蓝三色。 涉及的软件: Kittenblock、arduino 。 #include <Arduino.h> #include "Adafruit_NeoPixel.h" int x; Adafruit_NeoPixel neopix_4(16, 4); void setup(){ neopix_4.begin();; } void loop(){ x = 1; for(int i=0;i<30;i++){; neopix_4.setPixelColor(x, 170, 228, 0); neopix_4.show(); x += 1; delay(0.1*1000); } neopix_4.clear(); neopix_4.show(); delay(1*1000); }

arduino驱动16路舵机

一个人想着一个人 提交于 2020-04-02 21:12:19
https://item.taobao.com/item.htm?spm=a1z09.2.0.0.435e2e8dKDHquW&id=536890985912&_u=21qf7bf5b2a1 无论是电脑USB供电还是专门12v-2A供电 都可以 板子可以级练控制多个 安装库 /*************************************************** This is an example for our Adafruit 16-channel PWM & Servo driver Servo test - this will drive 8 servos, one after the other on the first 8 pins of the PCA9685 Pick one up today in the adafruit shop! ------> http://www.adafruit.com/products/815 These drivers use I2C to communicate, 2 pins are required to interface. Adafruit invests time and resources providing this open source code, please support Adafruit

mqtt error void callback/subscribed on arduino

陌路散爱 提交于 2020-03-26 04:38:29
问题 I'm testing with my arduino and MQTT cloud. For the publish everything goes well, the arduino publishes "hello world" But with the void callback function nothing happens. With my MQTT.fx client, I'm subscribed to the topics "status" and "commando". At the "status" I see that the arduino is a live. When I publish with my MQTT.fx client to the topic "commando". I can see it arrived in my client, but not in the serial monitor of the arduino. Why is the void callback function not used? #include

QObject::connect: Parentheses expected, signal QSerialPort::readyRead in ..\voltage_sensor\dialop.cpp:41

…衆ロ難τιáo~ 提交于 2020-03-25 19:38:07
问题 I am not sure why Qt is outputting this to me. The code compiles, and all the syntax is formatted correctly. I have tried looking at different forum posts, but I am unable to pinpoint the error. I am currently testing with a breadboard, circuit, and light bulb; all the hardware works and I am able to capture a voltage in the Arduino software (I can add the Arduino code if need be). The issue I am having is that I can't display a voltage in Qt. I am using an Arduino Uno and an Arduino Voltage

Problem flashing program to Arduino / esp8266 -> getting the following error

风格不统一 提交于 2020-03-25 13:50:11
问题 The error is: Arduino: 1.8.12 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200" Executable segment sizes: IROM : 329240 - code in flash (default or ICACHE_FLASH_ATTR) IRAM : 27992 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...) DATA : 1408 ) - initialized variables (global, static) in RAM/HEAP RODATA : 2044 ) / 81920 - constants

Problem flashing program to Arduino / esp8266 -> getting the following error

戏子无情 提交于 2020-03-25 13:48:28
问题 The error is: Arduino: 1.8.12 (Windows 10), Board: "NodeMCU 0.9 (ESP-12 Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200" Executable segment sizes: IROM : 329240 - code in flash (default or ICACHE_FLASH_ATTR) IRAM : 27992 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...) DATA : 1408 ) - initialized variables (global, static) in RAM/HEAP RODATA : 2044 ) / 81920 - constants

arduino 控制 HC-SR01超声波测距模块

霸气de小男生 提交于 2020-03-14 10:56:49
//LingShun LAB #define Trig 2 //引脚Tring 连接 IO D2 #define Echo 3 //引脚Echo 连接 IO D3 float cm; //距离变量 float temp; // void setup() { Serial.begin(9600); pinMode(Trig, OUTPUT); pinMode(Echo, INPUT); } void loop() { //给Trig发送一个低高低的短时间脉冲,触发测距 digitalWrite(Trig, LOW); //给Trig发送一个低电平 delayMicroseconds(2); //等待 2微妙 digitalWrite(Trig,HIGH); //给Trig发送一个高电平 delayMicroseconds(10); //等待 10微妙 digitalWrite(Trig, LOW); //给Trig发送一个低电平 temp = float(pulseIn(Echo, HIGH)); //存储回波等待时间, //pulseIn函数会等待引脚变为HIGH,开始计算时间,再等待变为LOW并停止计时 //返回脉冲的长度 //声速是:340m/1s 换算成 34000cm / 1000000μs => 34 / 1000 //因为发送到接收,实际是相同距离走了2回,所以要除以2