arduino

Why “No NFC device found” with libnfc and PN532 SHIELD

此生再无相见时 提交于 2020-06-27 13:07:13
问题 I installed the libnfc on my ArchLinux and i would use it through my Adafruit PN532 arduino SHIELD. nfc-list returns me the message "No NFC device found". I have the following file in /etc/nfc/devices.d/pn532.conf that gives me nfc-list uses libnfc 1.7.1 error libnfc.driver.pn532_uart pn53x_check_communication error error libnfc.chip.pn53x Unexpected PN53x reply! nfc-list: ERROR: Unable to open NFC device: pn532_uart:/dev/ttyACM0 Any idea about how to fix that ? TY 回答1: First of all verify

How to get out this Do-While loop?

♀尐吖头ヾ 提交于 2020-06-16 03:00:08
问题 I've this basic Arduino code, and I want to have 2 options to exit this Do-While loop . I simplified my original code to highlight the real problem: the Do-While doesn't recognize the OR || condition to exit the loop In this code I'm starting with two integer variables that are equal to zero and as soon as they enter the Do-While, they'will be setted equal to 2 both, so that they can immediately exit the Do-While in the first iteration. Here's my code: int fin = 0; int ending = 0; int counter

Arduino switch button

五迷三道 提交于 2020-06-13 09:41:01
问题 I have a simple Arduino Project, 2 buttons and face a strange case that in the beginning status of buttons are 0, but after click on the button and release the status becomes 1 for long a time then back to 0, please what is the wrong?? Code: int const BTN1_PIN=2; int const BTN2_PIN=4; void setup(){ pinMode(BTN1_PIN, INPUT); pinMode(BTN2_PIN, INPUT); Serial.begin(9600); } void loop(){ int status1=digitalRead(BTN1_PIN); Serial.print("BTN1 Status :"); Serial.println(status1); int status2

IDs for LoRa modules

☆樱花仙子☆ 提交于 2020-06-13 00:12:13
问题 I use two SX1278 LoRa Ra-02 modules for communication. I wonder how I can set IDs for these two modules to deny an interference with other LoRa modules which work at the same frequency. I mean, is there a solution similar to pipe addresses of NRF24l01 communication. Thanks in advance. 回答1: Encryption is the answer to blocking snooping on your communication. This can be a basic XOR encryption, a Caesar cipher or even better rsa. For the unique ID problem: there are several solutions to this

Bluetooth HC-05 sending error 1F for INQ command only

◇◆丶佛笑我妖孽 提交于 2020-06-12 09:15:54
问题 I have a problem with my new bluetooth HC-05 module. In AT-mode it works perfectly with all commands that I need... exept INQ. I have tried to send whole bunch of other commands beforehand: AT+INIT OK AT+ORGL OK AT+ROLE=1 OK AT+CLASS=0 OK They all are working just fine. I tried to change IAC and INQM settings as well... but the answer from module is always the same: AT+INQ ERROR:(1F) I read related topic here and tried to push the button at HC-05, as it recommended there, but -- no result

ESP32 Flashing upload starts and fails with timeout

我与影子孤独终老i 提交于 2020-06-01 06:20:22
问题 I have an ESP32-WROOM, as seen here. In the Arduino IDE, I compile and verify my sketch, and then attempt an upload. I get the following error: esptool.py v2.1 Connecting........___ Chip is ESP32D0WDQ6 (revision (unknown 0xa)) Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB Compressed 8192 bytes to 47... A fatal error occurred: Timed

ESP32 Flashing upload starts and fails with timeout

余生颓废 提交于 2020-06-01 06:19:33
问题 I have an ESP32-WROOM, as seen here. In the Arduino IDE, I compile and verify my sketch, and then attempt an upload. I get the following error: esptool.py v2.1 Connecting........___ Chip is ESP32D0WDQ6 (revision (unknown 0xa)) Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB Compressed 8192 bytes to 47... A fatal error occurred: Timed

ESP32 Flashing upload starts and fails with timeout

徘徊边缘 提交于 2020-06-01 06:19:06
问题 I have an ESP32-WROOM, as seen here. In the Arduino IDE, I compile and verify my sketch, and then attempt an upload. I get the following error: esptool.py v2.1 Connecting........___ Chip is ESP32D0WDQ6 (revision (unknown 0xa)) Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB Compressed 8192 bytes to 47... A fatal error occurred: Timed

Cloud Firestore REST API - Add server timestamp

不想你离开。 提交于 2020-05-24 02:52:25
问题 I'm using an Arduino with an ESP8266-01 module to upload a value to a Cloud Firestore database using the createDocument API with the following payload: { "fields": { "distance": { "integerValue": "555" } } } I do a POST-request to a route like this: https://firestore.googleapis.com/v1beta1/projects/<MY_PROJECT>/databases/(default)/documents/<SOME_COLLECTION>?key=MY_VERY_SECRET_KEY That all works, but I would like to add the server timestamp as well. I've found a few answers here on

Arduino Iot Project parseObject() failed

主宰稳场 提交于 2020-05-17 08:47:26
问题 I'm trying to control 8 channel relay with esp8266. and i've been following this tutorial on youtube https://www.youtube.com/watch?v=dLmz0xdDOLk I did exactly what the guy said. I uploaded my code to Arduino and I get a "parseObject() failed" error on the serial monitor while the code trying to parse JSON i think(not sure). I don't really understand coding much so I wonder if you guys help me out with my project.(the only thing I couldn't do was to change my web host PHP version to 5.2, I use