arduino

arduino(9):使用ESP8266,连接到RFID RC522 设备上,读取门禁卡上的设备信息

≯℡__Kan透↙ 提交于 2020-02-08 10:05:09
目录 前言 1,关于arduino 使用 rfid-rc522 2,使用 3,总结 前言 相关arduino 全部分类: https://blog.csdn.net/freewebsys/category_8799254.html 本文的原文连接是: https://blog.csdn.net/freewebsys/article/details/104114070 未经博主允许不得转载。 博主地址是: http://blog.csdn.net/freewebsys 1,关于arduino 使用 rfid-rc522 接线参考文章: https://blog.csdn.net/qq_31878883/article/details/88971935 这边使用的lib 库是 https://github.com/miguelbalboa/rfid 样例也是参考上面的,需要下载 库到 libraries 文件夹中。 有 1.7K 的收藏,然后使用其中的example 中的代码。 2,使用 代码,代码不是很多,但是需要注意下配置: #define RST_PIN 5 #define SS_PIN 4 这两个配置的是 5 和 4 的针脚,使用的是 SPI 进行通讯的。 /* * --------------------------------------------------------

arduino详细介绍

删除回忆录丶 提交于 2020-02-07 11:24:47
一、Ardinuo基础1. 褐色为系统命令(int,void,setup),蓝色为命令功能的开关(OUTPUT),黑色为变量。三、经典历程:打印出hello worldvoid setup() {Serial.begin(9600);}void loop(){Serial.println(“Hello world”);delay(1000);}四、Arduino 的数字输出Arduino的数字1/O被分成两个部分,其中每个部分都包含有6个可用的IO管构,即管脚2到管脚7和管脚8到管脚13.除了管脚13上接了一个1K的电阻之外,其他各个管脚都直接连接到ATmega上。我们可以利用个6位的数字跑马灯,来对Arduino数字yO的输出功能进行验证,以下是相应的原理图: 电路中在每个I/O管脚.上加的那个1K电阻被称为限流电阻,由于发光极管在电路中没有等效电阻值,使用限流电阻可以使元件上通过的电流不至于过大,能够起到保护的作用。 该工程对应的代码为: int startPin= 2;int endPin = 7;int index= 0;void setupO{ for (inti= startPin;i<= endPin;i++){ pinMode(i, OUTPUT); void loop(X{ for (inti= startPin;i<= endPin;i++){

I/O Error [121] between Arduino and Rpi using i2c communication

不羁的心 提交于 2020-02-07 04:04:04
问题 I have connected Rpi with Arduino using i2c communication. Pin Configuration: Rpi ---- Arduino Mega SDA SDA SCL SCL GND GND I also have an encoder attached to Rpi. Encoder `------ Rpi 5V 5V Gnd Gnd Output A Gpio 17 (BCM layout) Output B Gpio 18 (BCM Layout) Code is working perfectly fine, however after sometime, I am getting an error: 121, Remote I/O Error. Also, before the error (before starting the communication), on executing i2cdetect -y 1, I see only one slave address (20) same address

jetson nano 安装arduino ide

北城以北 提交于 2020-02-06 13:02:38
一。apt get 安装 通过 sudo apt-get install arduino 可以进行安装,但是版本是1.10的,好多编译语法不一样 因此采用安装包方法安装1.18.1: 二,安装包安装 本来下载的是arm版的,但是安装后打不开,后来发现nano三arch架构,需要下载arch版: 地址: https://downloads.arduino.cc/arduino-1.8.10-linuxaarch64.tar.xz 下载的不下来的我这里提供资源地址,或者留言邮箱地址为发给你: arduino-arch64 解压缩后进入目录 执行: sudo install.sh 执行成功后会在桌面创建图标,但是此时还不能用,更改所有者为当前用户: 进入桌面目录: cd ~/Desktop/ chengyangkj改为自己的用户名 chown chengyangkj arduino-arduinoide.desktop 点击桌面图标,信任程序: 安装成功: 来源: CSDN 作者: 蒋程扬 链接: https://blog.csdn.net/qq_38441692/article/details/104193542

Arduino program running out of resources

我怕爱的太早我们不能终老 提交于 2020-02-06 11:28:29
问题 I reset the wifi shields firmware, following this tutorial. Could that cause any errors later, if not done correct? Edit2 I have still no idea where the problem could be. So i put my .ino file here. (it's compiled: 25.052 Bytes) I would be very pleased if someone could check if it's running on another environment, and report about it. I replaced the sensor by fake values, so you don't need to add any hardware. Just need to add your router ssid and the password on top of the sketch. If you

Arduino program running out of resources

旧城冷巷雨未停 提交于 2020-02-06 11:27:07
问题 I reset the wifi shields firmware, following this tutorial. Could that cause any errors later, if not done correct? Edit2 I have still no idea where the problem could be. So i put my .ino file here. (it's compiled: 25.052 Bytes) I would be very pleased if someone could check if it's running on another environment, and report about it. I replaced the sensor by fake values, so you don't need to add any hardware. Just need to add your router ssid and the password on top of the sketch. If you

arduino(7):使用ESP8266,使用ArduinoJson库,进行Json序列化和反序列化

三世轮回 提交于 2020-02-06 10:14:16
目录 前言 1,关于arduino Json 2,使用 3,总结 前言 相关arduino 全部分类: https://blog.csdn.net/freewebsys/category_8799254.html 本文的原文连接是: https://blog.csdn.net/freewebsys/article/details/104190356 未经博主允许不得转载。 博主地址是: http://blog.csdn.net/freewebsys 1,关于arduino Json 项目地址: https://github.com/bblanchon/ArduinoJson 里面封装了,Json 相关的使用方法,对于数据上报帮助非常大。 同时对于数据解析作用也特别大。 2,使用 直接克隆项目代码到 libraries 就行。然后重启 arduino IDE 就可以使用了。 #include <ArduinoJson.h> void setup() { Serial.begin(9600); DynamicJsonDocument doc(1024); // WARNING: the string in the input will be duplicated in the JsonDocument. String input = "{\"sensor\":\"gps\",\

ESP系列 Arduino 相关资料库整理

好久不见. 提交于 2020-02-04 10:13:13
在这里我将不定期更新 ESP 系列 Arduino 相关的资料库链接,如果有链接失效的情况希望大家能及时通过评论通知我,感谢大家! 1. ESP8266 ESP 8266 Arduino Library 2. ESP32 github 上的 espressif/arduino-esp32 官方库 来源: CSDN 作者: BigZombieZ 链接: https://blog.csdn.net/zztiger123/article/details/103595257

arduino寻找IIC(I2c)设备地址

一曲冷凌霜 提交于 2020-02-04 01:50:36
arduino寻找IIC(I2c)设备地址 寻找IIC设备地址 官方地址 官方地址:i2c_scanner(http://playground.arduino.cc/Main/I2cScanner) 示例 : 可参考我的另外一篇博客 Arduino实践(二)lcd1602 把模块按接线方法接好,上传这段代码后,打开端口监视器,就能找到在I2C上的设备地址. # include <Wire.h> void setup ( ) { Wire . begin ( ) ; Serial . begin ( 9600 ) ; Serial . println ( "\nI2C Scanner" ) ; } void loop ( ) { byte error , address ; int nDevices ; Serial . println ( "Scanning..." ) ; nDevices = 0 ; for ( address = 1 ; address < 127 ; address ++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire .

ESP8266 connection to a Arduino Nano

烈酒焚心 提交于 2020-02-03 05:48:05
问题 I am trying to connect a WiFi module (ESP8266) to a "funduino" development board (Arduino Nano) but I have no success. Since I tried so much schematics I've found on the internet about the connection between them two, I kindly ask here if is anyone who succeed in "pairing" this two devices. I am asking for the schematic and a functional source code. Regards 回答1: So you have multiple ways to pair those two devices. The best and most reliable is a serial connection which consists of 2 wires, RX