arduino

Reading a Serial Port - Ignore portion of data written to serial port for certain time

半世苍凉 提交于 2020-01-01 18:13:40
问题 I would like to read data coming and Arduino on a serial port on intervals. So essentially something like Take a reading Wait Take a reading Wait Take ... etc. The problem I am facing is that the port will buffer its information so as soon as I call a wait function the data on the serial port will start buffering. Once the wait function finishes I try and read the data again but I am reading from the beginning of the buffer and the data is not current anymore, but instead is the reading taken

Arduino (processing) Library in Netbeans and control

回眸只為那壹抹淺笑 提交于 2020-01-01 12:07:09
问题 I am trying to control 4 LEDs and getting analog input from 4 contacts. The program is written in java, so to gain acces to the functions of arduino, such as AnalogRead() and setting an LED to high or low, would importing the processing library let the program use those functions? I was also wondering, if the program, will be transferred to the arduino it self, or the java program will just pull the data from the pins? 回答1: Update : My suggestion is to first try communicating the Arduino with

Communicating with Arduino from Android

爱⌒轻易说出口 提交于 2020-01-01 07:14:08
问题 i'm trying to communicate with Arduino board (Duemilanove) from Android 3.1 device with USB-host support using Android USB Host API. The goal is to communicate with the board in the same way as via Serial. I follow this manual (http://android.serverbox.ch/?p=427) but have few problems (f.e. failed to claim interface) and of coarse dev guide (http://developer.android.com/reference/android/hardware/usb/package-summary.html) but no luck. The questions are: how to prepare arduino board (modify

Communicating with Arduino from Android

有些话、适合烂在心里 提交于 2020-01-01 07:13:11
问题 i'm trying to communicate with Arduino board (Duemilanove) from Android 3.1 device with USB-host support using Android USB Host API. The goal is to communicate with the board in the same way as via Serial. I follow this manual (http://android.serverbox.ch/?p=427) but have few problems (f.e. failed to claim interface) and of coarse dev guide (http://developer.android.com/reference/android/hardware/usb/package-summary.html) but no luck. The questions are: how to prepare arduino board (modify

Batch-File: Receive Data from the Serial-Port and write it into txt-File

爱⌒轻易说出口 提交于 2020-01-01 05:59:26
问题 I'm trying to extract some data from an Arduino over the usb-serial-port and to write it into a txt-file. Therefore i'm using a batch-file (Windows 7, ordinary cmd), which sends e.g. a "d" to request the desired data from the Arduino. Having received the "d", the Arduino starts to send the data to the pc. The batch-file reads the data and writes it to some txt-file. The batch code is: mode COM4 BAUD=9600 PARITY=n DATA=8 echo d >COM4 COPY COM4 data.txt That works so far, but the problem is:

how create TCP server by ESP8266?

六月ゝ 毕业季﹏ 提交于 2020-01-01 03:40:33
问题 I want to create a simple Wifi TCP server by ESP8266 in Arduino IDE. But I have a big problem: when I send a character or string from client I can't receive it on the server. In fact I connect esp8266 to my PC and I want to see send character from client in pc terminal. my sending side is Socket protocol app for android!and complete code I write in sever side is: WiFiServer server(8888); void setup() { initHardware(); setupWiFi(); server.begin(); } void loop() { WiFiClient client = server

How to use BLE Shield based on HM-10 bluetooth module?

核能气质少年 提交于 2020-01-01 03:30:25
问题 I'm a new bie on arduino projects. I would like to ask you for some help. I bought a BLE Shield for Arduino from ( http://imall.iteadstudio.com/development-platform/arduino/shields/im130704001.html ). They made this shield using Hm-10 Bluetooth module(http://www.jnhuamao.cn/bluetooth.asp?ID=1). Itead Studio has no sample codes using this shield. I have no idea on how to program it or send AT commands from Arduino. I read the “AT commands” at the data sheet (ftp://imall.iteadstudio.com/Shield

How can I improve PySerial read speed

£可爱£侵袭症+ 提交于 2020-01-01 03:17:27
问题 I'm currently building a machine that uses an Arduino Mega2560 as its main controller. The Arduino is connected to over serial, gets a command, executes it and spits out a bunch of measurement data every 1ms. I have a Raspberry Pi running Python to give the user a nice GUI to send the command, and to present the data in a readable form. The problem I face: the Arduino is able to spit out 15 byte of data each millisecond (so that's only 15kbyte/s), but the code I'm running can only cope with

How can I improve PySerial read speed

烂漫一生 提交于 2020-01-01 03:17:12
问题 I'm currently building a machine that uses an Arduino Mega2560 as its main controller. The Arduino is connected to over serial, gets a command, executes it and spits out a bunch of measurement data every 1ms. I have a Raspberry Pi running Python to give the user a nice GUI to send the command, and to present the data in a readable form. The problem I face: the Arduino is able to spit out 15 byte of data each millisecond (so that's only 15kbyte/s), but the code I'm running can only cope with

Arduino void loop stops after a while

a 夏天 提交于 2019-12-31 07:42:33
问题 /******************************************************************************************************* I am currently building an autonomous vehicle. What it does is as follows it draws GPS information and Magnetometer Sensor data. Then when all sensor data is collected, Arduino decides which way to turn. This is done by calculating a heading error. *******************************************************************************************************/ /*************************************