arduino

How do I reset my Arduino Mega2560 with my C# application?

╄→гoц情女王★ 提交于 2020-01-04 07:20:02
问题 I noticed the Arduino IDE automatically resets on startup/exit by the built in serial application due to one of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega1280 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. I noticed that behaviour does not happen with my serial C# application. I would like the reset feature to work with my C# application. What am I not doing to

Serial communication (for Arduino) using Visual Studio 2008 and C

淺唱寂寞╮ 提交于 2020-01-04 06:01:29
问题 I want to send data to my Arduino board using Visual Studio and C. I specifically need to use C since I am using ARToolKit to get markers and sending the data accordingly. I was trying the code #include<stdio.h> #include<stdlib.h> void main() { system( "MODE COM9: BAUD=9600 PARITY=n DATA=8 STOP=1" ) ; FILE port = fopen( "COM9:", "wb" ) ; printf("hello"); fprintf( port, "s" ) ; fclose( port ) ; } but it is not getting compiled. I just need to send data. 回答1: I understood from your post that

Arduino making decision according to a packet received from serial port

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-04 05:39:12
问题 The program listen to messages from serial port in the form or where first character (A or D) means analog or digital, the 2nd character - pin, the 3rd character - 1/0 or from 0 to 255. The markers < and > show the beginning and the end of packet. For example, if packet is received, the light is turned on by digitalWrite(13,1) But nothing happens. When I send via serial monitor, for instance: light is supposed to blink but it does not. The same with analogue outputs. bool started = false;

Split string by delimiter strtok weird behaviour

穿精又带淫゛_ 提交于 2020-01-04 04:24:07
问题 I am trying to split string ,but unfortunately strtok behaves weirdly I have following string get|user=password|23|info|hello I have tried widely used method using strtok, but unfortunately it treats = as delimiter and I cannot parse my string. So get parsed correctly than parsed only user , but not user=password . Please help to find the problem or suggest any other way to split the string. I am programming for Arduino. Thanks Code const char delimeter = '|'; char *token; token = strtok

Input process and type for static uint8_t array

℡╲_俬逩灬. 提交于 2020-01-04 03:25:34
问题 I am currently trying to convert an integer variable to the value of a static uint8_t array in the Arduino IDE. I am using: #include <U8x8lib.h> And I do understand that uint8_t acts similarly to the byte type. Currently, the array has a set value: static uint8_t hello[] = "world"; From my perspective, "world" looks like a string, so I thought I would start with creating a string variable: String world = "world"; static uint8_t hello[] = world; This did not work and gave me the error:

Arduino学习笔记② Arduino语言基础

纵饮孤独 提交于 2020-01-03 22:26:38
授人以鱼不如授人以渔,目的不是为了教会你具体项目开发,而是学会学习的能力。希望大家分享给你周边需要的朋友或者同学,说不定大神成长之路有博哥的奠基石。。。 QQ技术互动交流群:ESP8266&32 物联网开发 群号622368884,不喜勿喷 一、你如果想学基于Arduino的ESP8266开发技术 一、基础篇 ESP8266开发之旅 基础篇① 走进ESP8266的世界 ESP8266开发之旅 基础篇② 如何安装ESP8266的Arduino开发环境 ESP8266开发之旅 基础篇③ ESP8266与Arduino的开发说明 ESP8266开发之旅 基础篇④ ESP8266与EEPROM ESP8266开发之旅 基础篇⑤ ESP8266 SPI通信和I2C通信 ESP8266开发之旅 基础篇⑥ Ticker——ESP8266定时库 二、网络篇 ESP8266开发之旅 网络篇① 认识一下Arduino Core For ESP8266 ESP8266开发之旅 网络篇② ESP8266 工作模式与ESP8266WiFi库 ESP8266开发之旅 网络篇③ Soft-AP——ESP8266WiFiAP库的使用 ESP8266开发之旅 网络篇④ Station——ESP8266WiFiSTA库的使用 ESP8266开发之旅 网络篇⑤ Scan WiFi—

What is Nak Limit?

别说谁变了你拦得住时间么 提交于 2020-01-03 09:05:17
问题 Am trying to understand how the Android Open Accessory API works with the Arduino ADK board, I've been able send and receive information but I just want to know how everything works. I got to this function description: int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) { return usb.newInTransfer(1, in, len, (char *)buff, nakLimit); } From some googling I figured that NAK is some code that gets sent if something went wrong during the handshake, so is NAK limit the number of

What is Nak Limit?

六月ゝ 毕业季﹏ 提交于 2020-01-03 09:05:10
问题 Am trying to understand how the Android Open Accessory API works with the Arduino ADK board, I've been able send and receive information but I just want to know how everything works. I got to this function description: int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) { return usb.newInTransfer(1, in, len, (char *)buff, nakLimit); } From some googling I figured that NAK is some code that gets sent if something went wrong during the handshake, so is NAK limit the number of

Convert binary string into decimal

懵懂的女人 提交于 2020-01-03 06:46:07
问题 I would like to convert a string that is a binary to a decimal. Here is what the fullCard value is. fullCard = "1000000100000101111101" Here is what it should look like after being converted to decimal fullCardInt = 2113917 Main.ino String fullCard; // binary value full card number int fullCardInt = bin2dec(const_cast<char*>(fullCard.c_str())); // I get -1 which is a failure. serial.print(fullCardInt); int bin2dec(const char *bin) { int result=0; for(;*bin;bin++) { if((*bin!='0')&&(*bin!='1')

How can I receive simple integer values over bluetooth in ios

回眸只為那壹抹淺笑 提交于 2020-01-03 05:48:45
问题 I am trying to learn how to get some sensors plugged into an Arduino board to talk to an iPhone over Bluetooth with a Red Bear Labs mini board but have hit a brick wall. The sensors get a reading and this is sent to the phone over BLE. So far I've connected to the device and I get back what appears to be data but I can't make sense of it. I've written a little sketch that looks like this, to simulate the sensor data. #include <SoftwareSerial.h> SoftwareSerial bluetooth(5, 6); void setup() {