arduino-uno

Arduino - detecting motion/movement?

为君一笑 提交于 2019-12-13 21:16:01
问题 I need to detect in which direction the item is moving. I want to know if the item is moving up or down. Is this possible with this platform and by using a specific shield? I had in my mind the ultrasonic sensor, with which I would measure how far the item is from a certain point, and with this suggest what type of movement is happening because of the distance changes. I think this might be tricky, and wanted to see if there are better alternatives. UPDATE: I updated the question, corrected

How to send internet packets between two Arduinos?

本小妞迷上赌 提交于 2019-12-13 07:49:02
问题 For a project I am working on, I am wondering if there is a way to send internet packets between two Arduinos. The setup would be to have both Arduinos have ethernet shields. One shield is connected to a computer and the other to a router or other internet connection. The Arduinos need to communicate to each other relaying the packets of information. The goal is to be able to ping the router from my computer through these two Arduinos. Any help would be greatly appreciated. Thank you. 回答1:

Why does the Arduino IDE work with NodeMCU? [closed]

痴心易碎 提交于 2019-12-13 07:46:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I know when we buy a NodeMCU, we get the NodeMCU firmware already installed in it. But how come we are able to use the Arduino IDE (used for C++ programming) with this dev kit? How can we use a C++ IDE to work with a Lua-based firmware? What's wrong with my concepts here? 回答1: "Lua based firmware" is a bit

Python SerialException: Device reports readiness to read but returned no data

情到浓时终转凉″ 提交于 2019-12-12 17:14:13
问题 I'm using an Arduino Nano, previously an UNO, to collect data from sensors and then send the data back over a USB connection through a powered hub to a Raspberry Pi model B running Jessie 4.1.19+ Mar, 15 2016 and Python 2.7. The python code uses pyserial readline to get the data. In general it works fine but occasionally (typically a couple of times a day) it fails with the above message. It seemed the only way to fix it was to unplug the USB connection, reconnect it and restart the program.

LCD not working in node.js + Arduino project

僤鯓⒐⒋嵵緔 提交于 2019-12-12 05:25:26
问题 I am following this tutorial, but I am doing a very basic version where I just want to print something out. All the pins and hardware specification are followed as per that tutorial. Below is my app.js code: var five = require('johnny-five'); var board = new five.Board(); var lcd; board.on('ready', function() { lcd = new five.LCD({ // LCD pin name RS EN DB4 DB5 DB6 DB7 // Arduino pin # 12, 11, 5, 4, 3, 2 pins: [12, 11, 5, 4, 3, 2], rows: 2, cols: 16 }); lcd.clear().print("Hello NJ"); this

arduino not writing to sd card

蓝咒 提交于 2019-12-12 04:19:55
问题 I have an Arduino with a Seeedstudio sd card shield v4.0 with a prototpye shield above that, and on that is a TMP36 temperature sensor and a red and two green LEDs, the red to show that it is "Ready" to log data, the first green to show that it is currently "logging data" and the last LED to show that the data was "Saved" to the SD card, which it dosent, at the beggining of the file, however, it creates the line "Testing 1, 2, 3..." in a txt file called TEST. in that same file there should be

arduino serial erratic behaviour missing characters and occasionally the whole transmission

瘦欲@ 提交于 2019-12-12 04:19:44
问题 I have a problem with the hardware serial on the UNO, in many occasions it seems to drop a character (usually the first character being received) and in some cases it misses a whole transmission. this only occurs when the Arduino is receiving data from the computer typed by me in the serial monitor. I can see the RX light flashing when I send the string but the arduino just completely ignores it. The data I am sending is three comma separated 8 bit unsigned integers #include <Adafruit

How to send serial data via Bluetooth to an unspecified device?

只谈情不闲聊 提交于 2019-12-12 03:35:25
问题 I use the following code for an Arduino Uno: #include <SoftwareSerial.h> SoftwareSerial device(2, 3); void setup() { device.begin(9600); } void loop() { device.println("33,89,156,203,978,0,0;"); } No specific device to send to is set. If I want to receive the data on my laptop (running Ubuntu 14.04) I simply call: sudo rfcomm bind rfcomm0 [MAC ADDRESS] 1 and screen /dev/rfcomm0 in another terminal instance and it works. How can I achieve the same behaviour with an Android app? The following

Gsm800 mqtt library

与世无争的帅哥 提交于 2019-12-12 02:33:06
问题 I have sim800 module ,i want to control relay from webserver so i need mqtt library and sample code for arduino uno please help to me,What is AT command for publish and subscribe the tag in sim800 using arduino uno 回答1: I think it is very unlikely that your SIM800 module will have an AT command for MQTT. There are a couple of MQTT libraries for Arduino: AdaFruit: https://github.com/adafruit/Adafruit_MQTT_Library PubSubClient by Nick O'Leary: http://pubsubclient.knolleary.net/ Both of these

convert from hex to decimal Arduino

拜拜、爱过 提交于 2019-12-11 18:41:17
问题 I am extracting the weight of a Reach Stacker , for the moment this is my result : get data from ID: 18FFF227 2 1 F0 3C 0 0 1 0 what I need is to take F0 3C 0 0 and change it to 0 0 3C F0 then convert it to number to decimal. 003CF0 = 15600 according to this page: enter link description here this would be my number in decimal 15600 this my code : #include <SPI.h> #include "mcp_can.h" #include <SoftwareSerial.h> SoftwareSerial mySerial (3,2); // the cs pin of the version after v1.1 is default