![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Arduino
码农菌
南朝四百八十寺 多少楼台烟雨中
展开
-
Arduino-驱动LCD1602A
Demo_01、显示温湿度数据注意 :根据我的代码注释进行接线,如果还有不懂的就查看lcd的使用手册,有详细的电路图哦!#include <LiquidCrystal.h>//LCD的头文件#include <dht11.h>//导入dht11的头文件#define DhtPIN 2 //dht11控制的端口#define RS 6 //LCD1602的RS端口 //RW、VSS、K接GND,VDD、A接V原创 2021-10-31 11:29:22 · 765 阅读 · 0 评论 -
Arduino-驱动LoRa模块-节点
二、发送节点(定向传输)1、LoRa模块的配置步骤同我上篇基本一致。注意 :该节点Lora模块我配置为了定向传输。2、Arduino Uno 代码#include <SoftwareSerial.h>#include <dht11.h> //导入dht11的头文件#define DhtPIN A0 //dht11控制的端口SoftwareSerial LoRa_Serial(2, 3); // RX, TX //原创 2021-10-31 11:23:38 · 894 阅读 · 0 评论 -
Arduino-驱动LoRa模块-主节点
1、LoRa模块的配置模块我是买的正点原子的Lora sx1278用串口协议实现数据的传输,拿来配置一下就能用啦很方便。注意事项:(1)发射功率不要太高,会导致信号过于精准,不易于接收。(2)模块地址、通信信道以及波特率要保持一致。(3)配置的时候,上面的波特率一定要选115200,不然会提示连接超时。2、Arduino uno代码#include <SoftwareSerial.h> /软串口头文件#include <dht11.h> //导原创 2021-10-31 11:18:38 · 2115 阅读 · 9 评论 -
Arduino-使用millis()同时做两件(或更多)事情
#define ledPin 13 // LED connected to digital pin 13#define buttonPin 4 // button on pin 4int value = LOW; // previous value of the LEDint buttonState; // variable to store button stateint lastButtonState; // variable to store last button stateint bl.原创 2021-10-31 11:14:51 · 2417 阅读 · 0 评论 -
Arduino-串口信息的读取、输出
// ASCII Table void setup() { Serial.begin(9600); // prints title with ending line break Serial.println("ASCII Table ~ Character Map"); // wait for the long string to be sent delay(100); } int number = 33; // first visible character '!' is #3原创 2021-10-31 11:12:51 · 6162 阅读 · 0 评论 -
Arduino-怎么点亮LED?
初级点灯int ledPin = 13; // LED connected to digital pin 13void setup(){ pinMode(ledPin, OUTPUT); // sets the digital pin as output}void loop(){ digitalWrite(ledPin, HIGH); // sets the LED on delay(1000); // waits for a second digitalWrite(ledPin, LO原创 2021-10-31 11:09:13 · 437 阅读 · 0 评论