arduino

receive Character using Android phone from arduino

天大地大妈咪最大 提交于 2019-12-25 04:28:14
问题 I worked this code to receive a single letter of the arduino I can not see any response on the phone text viewer when I want arduino sends the letter 'A' shows me the word 'ON'and if Send 'Z' shows me the word in the text viewer off Note that the connection between the Android phone arduino been successfully and Android phone sends to arduino but it did not receive class Ahmed extends Thread { public void run() { for (; ; ) { try { int bytesAvailable = btSocket.getInputStream().available();

Arduino error : TKD2 was not declared in this scope

*爱你&永不变心* 提交于 2019-12-25 03:49:46
问题 i am a beginner in arduino and that's my first IR project and yet i have a problem with compiling ... Arduino error : TKD2 was not declared in this scope About the code i used is the example IRrecvDemo . 回答1: I've just bought an arduino beginner pack (sunfounder) and I had the same issue. What I did is: Delete the library IrRemote: (C:\Program Files\Arduino\libraries\RobotIRremote) Download a good one. Can be found at https://codeload.github.com/z3t0/Arduino-IRremote/zip/master Install it

FATFS returns FR_DISK_ERR the second time I use an identical line of code

放肆的年华 提交于 2019-12-25 03:33:23
问题 I am using FATFS to write data to an SD card. It partially works and I am able to write EEPROM data to the SD card. But when I use a different function later on in the code it returns 'FR_DISK_ERR' even though I'm using the same line of code. The first time I try to write to the SD card is as follows (At this point I have already initialized the SD card and made the file, that is not the issue): //write EEPROM to EEPROM file fr = f_open(&File, file_name, FA_OPEN_APPEND | FA_WRITE); if (fr ==

Sending Serial Data to Arduino Using Python Script

99封情书 提交于 2019-12-25 03:29:28
问题 I am facing a peculiar issue while writing characters to Arduino using python serial communication on macOS 10.14. The Arduino is programmed to read a string, parse it and take PWM action to run a car. Ardiuno's serial communication channel is configured to receive the strings in the format < A, B, C, D > where ABCD are numbers which denote car direction, speed, steering direction and steering position. The problem is, when I send a string from the serial monitor or through the Python

Arduino wifi shield cannot find IP address

谁都会走 提交于 2019-12-25 02:48:13
问题 Hi i'm trying to access my wifi shield's ip address on the browser but I keep getting Oops! Google Chrome could not connect to "IP ADDRESS". Things I've done: 1.)Updated firmware on wifi shield using this link http://ohmyfarads.com/2013/11/11/updating-firmware-on-arduino-wifi-shield-for-dummies/ 2.) uploaded the wifi WPA sketch from arduino site. My connection is WPA2 3.) I switched between arduino IDE 1.02 and 1.05 but no luck with either 4.) I'm using an arduino uno board that is attached

Serial.println changes return value of function (Arduino)

主宰稳场 提交于 2019-12-25 02:45:01
问题 I've been experiencing some very odd behaviour from what should be a very simple function: an integer is passed to the function, and depending on its value will return an unsigned char specific to that integer. I kept experiencing a problem in which it would return a different value to those that are hard coded into the function. I've had to rewrite the code a number of times to get it to stop happening, but I have found a way to recreate it every time to illustrate how something that shouldn

Stringification working with USERNAME:PASSWORD but not for SERIAL:TOKEN?

醉酒当歌 提交于 2019-12-25 02:31:06
问题 I have the following Makefile (If you are asking me why there's \" included you can refer to my previous question) BOARD_TAG = mega2560 CPPFLAGS = -DUSERNAME=\"$(USERNAME)\" -DPASSWORD=\"$(PASSWORD)\" include $(ARDMK_DIR)/Arduino.mk and code: void setup() { Serial.begin(9600); String auth_raw2(USERNAME ":" PASSWORD); Serial.println(auth_raw2); } void loop() {} when I compile this with make USERNAME=hello PASSWORD=world , everything works and I see 'hello:world' being printed out. However, if

Have Arduino IDE set compiler warnings to error

你说的曾经没有我的故事 提交于 2019-12-25 02:24:15
问题 Is there a way to set the compiler warnings to be interpreted as an error in the Arduino IDE? Or any generic way to set gcc compiler options? I have looked at the ~/.arduino/preferences.txt but found nothing that indicates fine tuned control. I also looked if I could set gcc options via environment variables, but did not find anything. I don't want to have verbose compiler output (which you can specify using the IDE) that is way too much distracting non-essential information, I don't want to

Gathering protocol from remote control helicopter

杀马特。学长 韩版系。学妹 提交于 2019-12-25 01:55:36
问题 I have a (S107G) mini helicopter, and an Arduino. The possibilities sounded quite fun. So I set off to find the protocol for the transfer of data from controller to helicopter with IR. I used this code to try to figure out something of it. void setup() { Serial.begin(9600); pinMode(12, INPUT_PULLUP); // 12 is IR sensor } void loop() { Serial.print(digitalRead(12) ? LOW : HIGH); delay(1); } Obviously there a number of flaws with this. delay(1); is arbitrarily chosen, I have no way of knowing

Method to convert byte array to integer without looping?

谁都会走 提交于 2019-12-25 01:53:39
问题 (I've seen these questions (Convert Bytes to Int / uint in C and Converting Byte Array To Int24) but they seem more complicated than what I am trying to do, so I thought I would ask.) I'm doing some LED matrix programming in Arduino/Wiring. For reasons probably not relevant here I have a byte array representing a "bit state" of a LED row, which I use to buffer the result of other operations. To actually set the LEDs (I'm using the Maxim 7219 chip), I need to derive an integer from the byte