arduino

Arduino being recognized as keyboard by android

纵然是瞬间 提交于 2019-12-13 04:59:59
问题 I wrote a simple firmware for arduino to replicate whatever incoming data it recieves on serial to the serial output. Something like this: int serialData = 0; void setup() { Serial.begin(9600); } void loop() { if (Serial.available() > 0) { serialData = Serial.read(); Serial.println(serialData); } } Now I wanted it connect to my Nexus 7 running on Android 4.3 using a microUSB->OTG cable + USB->microUSB cable. I installed a serial monitor app (https://play.google.com/store/apps/details?id=jp

Arduino: uint8_t array to string

折月煮酒 提交于 2019-12-13 04:48:39
问题 I have an NFC application built on android that sends a hash as an apdu answer. This is the code I use in my Android app to send the hash: @Override public byte[] processCommandApdu(byte[] arg0, Bundle arg1) { String hash = "e68d3f574009cbbe011150263634c5c0"; return hash.getBytes(Charset.forName("UTF-8")); } Now when I receive it on the Arduino side of things I get this RAW data: 10154561005110253555248485799989810148494949534850255255255255255255255255255 How do I get the hash back from that

Counting without “counter” in microcontroller is Possible?

和自甴很熟 提交于 2019-12-13 04:35:40
问题 Hello friends i am new in microcontroller domain wants to know is this not possible to counts an events without using counter i mean by monitoring the pin which is connected to the the event generator.i am asking this question because presently i want to calculate the frequency of sensor i have already checked it frequency by using DSO(Digital storage oscilloscope) and it(DSO) says its frequency is 98khz but as we all now that the maximum value of an 8 bit counter is 255 then how it is

POST for Azure Mobile/Web App (working from Arduino)

99封情书 提交于 2019-12-13 04:29:01
问题 I want to find samples of how to work with Mobile/Web App by sending POST. Previously in Mobile Services it was possible to send POST like this: POST /tables/table_name HTTP/1.1 Host: http://arduinounoserver.azure-mobile.net/ X-ZUMO-APPLICATION: YaRWxxxxzKGRxxxxLPiNxxxxXYOvxxxx {"value": 234} But now authentication was absolutely changed. How to do it now and is it possible to find somewhere POST samples? Have found only Table Service REST API but it's still not clear for me 回答1: you can

Splitting a comma-delimited string of integers

点点圈 提交于 2019-12-13 04:28:13
问题 My background is not in C (it's in Real Studio - similar to VB) and I'm really struggling to split a comma-delimited string since I'm not used to low-level string handling. I'm sending strings to an Arduino over serial. These strings are commands in a certain format. For instance: @20,2000,5! @10,423,0! '@' is the header indicating a new command and '!' is the terminating footer marking the end of a command. The first integer after '@' is the command id and the remaining integers are data

Error on Sending String Value “0”(Off) and “1”(On) to Arduino Via Bluetooth in Android

北慕城南 提交于 2019-12-13 04:23:44
问题 I'm currently developing a led controller for arduino via bluetooth. The app will enable first the bluetooth, and connect on a bluetooth module before you can use the on and off button to control a led. My problem is that everything goes well except when I click either the ON or the OFF button. The app will stop and will exit automatically. I'm still a beginner in creating an android app actually and I really have a hard time coding with it. I tried a lot of tutorials but still nothing

Execute a HTTP request within an app

孤街浪徒 提交于 2019-12-13 04:18:36
问题 I was wondering if I could make it open But NOT open the android browser, I just need it to visit: (pretend this is the ip) http;//91.91.91.91:2228?1, where it will trigger action on my arduino mega. I have tried to get it just to do this with this code onclick(Intent websiteIntent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.parse("http;//91.9.91.91:?1"); websiteIntent.setData(uri); startActivity(websiteIntent);) but I don't know how to get it to do so 回答1: A HttpClient will allow you to

Parsing array in library constructor - Pointer problem (C++)

大憨熊 提交于 2019-12-13 04:12:58
问题 I am trying to develop an Arduino library that consists out of two classes. I want 'WayPointStack' to store an array of 'WPCommand', but I can't get it to work. It is obviously a pointer problem, but I don't know how to solve it. There are four errors left in my code: WayPointStack.cpp:23:7: error: incompatible types in assignment of 'WPCommand*' to 'WPCommand [0]' _wp = new WPCommand[arrSize]; //Fixed WayPointStack.cpp:44:34: error: could not convert '(operator new(16u), (((WPCommand*)

Espressif ESP8266 NONOS_SDK - Makefile

你离开我真会死。 提交于 2019-12-13 03:58:12
问题 I would like to compile my source-code for the ESP8266 (Extensa NONOS_SDK Toolchain is already installed and working). This is my folder structure: I use this Makefile from an example from Espressif: https://github.com/espressif/ESP8266_NONOS_SDK/blob/master/examples/simple_pair/Makefile and I also use this gen_misc.sh : https://github.com/espressif/ESP8266_NONOS_SDK/blob/master/examples/simple_pair/gen_misc.sh I am running Ubuntu 18 as a Linux Subsystem for Windows 10. This is how I called

Python 3 CSV integers to bytes + \n [closed]

天涯浪子 提交于 2019-12-13 03:57:59
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 10 months ago . I'am Trying to Communicate with Arduino using serial communication in python. There is this program from arduino https://www.arduino.cc/en/Tutorial/ReadASCIIString . Simply sending a " 120,200,100" to control 3 LEDS. When I tried it in python writing data to the arduino so