arduino

Can't compile Arduino CapSense example

无人久伴 提交于 2019-12-24 02:54:12
问题 I'm trying to work with the CapSense library for Arduino. However, I can't manage to run the example included with the package, called "CapSenseSketch". When I try just opening the file and running it (I've tried both Arduino 1.0 and 1.0.1), I get a compiler error that says 'CapSense does not name a type", and also CapSenseSketch.cpp:1:22: error: CapSense.h: No such file or directory CapSenseSketch:11: error: 'CapSense' does not name a type CapSenseSketch:12: error: 'CapSense' does not name a

Cloud-to-device Azure IoT REST API

我是研究僧i 提交于 2019-12-24 02:24:12
问题 I explored on sending data from Device to Cloud using Azure REST Apis. It is working seamlessly without any issues. I'm not finding good articles on sending Cloud-to-Device messages to Arduino board using "Azure IoT Hub REST Apis". Could some one provide suggestions on this 回答1: You could also send the request as the azure portal does it. All C2D from AZ Portal are sent through this Endpoint https://main.iothub.ext.azure.com/api/Service/SendMessage/ and the payload is a json that look like

PySerial delay in reading line from Arduino

强颜欢笑 提交于 2019-12-24 02:12:08
问题 I'm using an arduino uno with the basic "DigitalReadSerial" setup as outlined here: http://arduino.cc/en/Tutorial/DigitalReadSerial If i use the serial monitor included with the arduino IDE, it immediately displays any changes from pressing the button. This is what i want in pyserial, either a 0 or a 1 depending on whether the button is pressed. (to eventually trigger a timer) just to test it, i threw this together, not the prettiest, but it seems to read out the pushbutton state, but there

undefined references to functions in linked avrfix library using avr-gcc compiler/linker

ぃ、小莉子 提交于 2019-12-24 02:07:09
问题 I am trying to use the avrfix library in a project, using Eclipse (v4.2.2) as the IDE and avr-gcc as the compiler. Both the header file (avrfix.h) and the library file (libavrfix.a) are included in the same directory, which is in the project's search path as well as the linker's library search path. When compiling, i get the following errors: D:\Documents\Arduino\IMU_Kalman\Release/../HMC5883/HMC5883.cpp:359: undefined reference to `lsincoslk(long, long*)' D:\Documents\Arduino\IMU_Kalman

Arduino: error: 'abs' was not declared in this scope

冷暖自知 提交于 2019-12-24 01:45:26
问题 I'm working on an arduino library needing the abs() function: #include <math.h> normTransFreq1 = abs(1.0); Error: 'abs' was not declared in this scope As math.h is already included in the cpp I'm entirely unsure how to fix this problem. A new install of arduino 1.5.2 didn't help. 回答1: Just found the solution: Including math.h is not needed for the library. Instead, Arduino.h should be included by adding the following to the header file: #if ARDUINO >= 100 #include "Arduino.h" #else #include

What is the minimum packet latency that can be achieved with classic bluetooth (2.1) devices?

左心房为你撑大大i 提交于 2019-12-24 01:38:10
问题 I'm using RN42 (http://www.microchip.com/wwwproducts/en/RN42) bluetooth module at 115200 bauds (UART SSP mode) to send very small (1 - 20 byte) serial data messages between a computer and a ATMega328 MCU. I find that the latency for one message is somewhere around 60 - 100 ms. I would need 10 ms or less in my application. I'm wondering if this is even possible with bluetooth 2.1 devices.´ I know that theoretically bluetooth packets can be sent every 2 * 625 us from one end since 625 us is the

Wrapper for printf

心已入冬 提交于 2019-12-24 00:26:52
问题 I am coding under Arduino and I would like to develop serial print formatting function, so I am trying to use sprintf of unknown sized buffer. Basically, we can avoid talking about Arduino and its serial output and consider writing text to a buffer and then printing it by using printf . I've tried this one: #include <stdio.h> #include <stdarg.h> void printf0( const char* format, ... ) { va_list args; va_start(args, format); vprintf(format, args); va_end( args ); } void printf1(const char*

Arduino 2048 游戏

泄露秘密 提交于 2019-12-23 20:39:41
这个文章直接从论坛复制过来,可以点击 论坛链接 访问。 一、概述   也不大懂项目提交格式怎样,参考别的已经提交的项目抄了下格式。   看了各位大神的项目,咱只能说重在参与来安慰自己,给自己壮胆啦。咱这就叫个小制作吧,项目啥的太高大上的名称配不上呀。   接触arduino三个多月,这个小制作算是测试各个示例程序后自己写的第一个完整的工程啦,主要目的是熟悉arduino IDE以及arduino编程语法,以及练习按键和LCD(我会告诉你真实目的是有参与奖嘛?^_-)。也趁着参赛,借着版主和坛友的监督督促自己,以克 服拖延症呀 二、元器件清单 arduino主板一块(这也是另外一位厉害的坛友自己制作的) LCD12864一块(最好是黄绿屏的,之前使用蓝屏白字的发现拍照效果不好) 按键六个(需要折脚处理,因为按键的脚是扁平的,横着不好插入面包板,竖着放又导致直接短路触点) 下拉电阻六个(随便拿了100K的,阻值要求不很严格的样子,反正工作正常) 电源一个(随便找了一个移动电源) 面包板一块(这样就可以避免暴露丑丑的焊功了,哈哈) 面包板连接线及U形线若干(U形线其实是网络折的) 三、制作过程 1. 元器件清单 2. 按键处理 3. 弯折接线及电阻 4. 插好接线和电阻后放按键 5. 插好按键 6. 摆好arduino位置 7. arduino接线 8. 接上LCD 9. 接上电源 10

SIM900 GSM/GPRS not getting a proper AT+CREG? answer

无人久伴 提交于 2019-12-23 18:42:31
问题 I'm using an Arduino UNO with attached IComsat SIM900 GSM/GPRS shield. Using the following tutorial: Arduino Live GPS Tracker I'm stuck with the AT+CREG? command, which checks if the SIM-card is registered at the provider. The following logic is used: In the GSM_HTTP.INO file within the "void setup()" function, the following line gets executed modem.checkNetwork(); void setup() { Serial.begin(9600); Serial.println("GM862 monitor"); modem.switchOn(); // switch the modem on delay(4000); // wait

Arduino: String to int gets strange values

怎甘沉沦 提交于 2019-12-23 16:01:59
问题 I want to convert a String to an int , and all I could find is that you have to convert the String to a char array and then cast this array to an int , but my code produces strange values and I can't figure out what the problem is. void ledDimm(String command) { // Get the Value xx from string LEDDimm=xx String substring = command.substring(8, command.length()); Serial.println("SubString:"); Serial.println(substring); Serial.println("SubString Length:"); Serial.println(substring.length()); //