arduino

JFreechart series movement with fixed x-axis

喜你入骨 提交于 2020-01-25 00:22:13
问题 First question here. I'm doing an Arduino serial port plotter with Java and JFreeChart. Everything's working fine with the DynamicTimeSeries dataset, as I'm able to plot data nice and softly. What I need to do now is this: given an established period of time (let's say 60 seconds) I want to plot the DynamicTimeSeries dataset on the chart for that period without moving the axis; I mean, like drawing a line for 60 seconds on the fixed chart. Is there any way to do this? Every example I've

VGA pixel grouping on STM32

冷暖自知 提交于 2020-01-24 22:57:13
问题 I have some code that displays a single pixel on screen through VGA but am a bit stuck on how I could set multiple pixels on screen where I want them. I set up two Timers for Vertical Sync and Horizontal Sync then using the V-Sync interrupt, I set a flag to allow PA8 to toggle and output a pixel at the correct timing based on the SetCompare value I set on the timer's channel. The STM32f103c8 is also overclocked to 128MHz. Here's the code: #include "Arduino.h" //640x480 at 60Hz static volatile

Arduino upload error “stk500_recv(): programmer is not responding” in Fedora

試著忘記壹切 提交于 2020-01-24 02:26:07
问题 I am attempting to upload the stock Blink sketch using the Arduino IDE in Fedora Core 15 Linux. I get this error: avrdude: stk500_recv(): programmer is not responding To recreate the issue: Plug in the Arduino Uno board via USB cable Open the Arduino IDE Menu File → Examples → 1. Basics → Blink Menu Tools → Serial Port → then check the box for /dev/ttyACM0 Menu Tools → Board → Arduino Uno Click the "Play" button to Verify/Compile (this step is successful) Click the Upload button, to get the

How to simply pass a string from android studio (kotlin) to arduino serial bluetooth module (HC-05)?

前提是你 提交于 2020-01-24 01:10:34
问题 I'm making an android app for a school project, using Android Studio ( Kotlin ). I need to send strings to an Arduino Genuino Uno module, passing by a HC-05 bluetooth module. The Arduino will already be connected (paired) to my android device when the app will be launched. Can someone help me to find a right and easy way to only SEND these datas ? Thanks a lot. 回答1: I finally got the answer, I did that : private fun CheckBt() { Toast.makeText(applicationContext, "It has started", Toast.LENGTH

BLE GATT onCharacteristicChanged not called after subscribing to notification

扶醉桌前 提交于 2020-01-23 05:32:22
问题 this is my first post on SO. I have some problems subscribing to GATT notifications on android 5.0.2 . What I aim to do is to connect an Arduino with a BLE Shield to my Android phone. I have a sensor connected to the Arduino and want to send the data from the Arduino to my phone by using the BLE shield. There is a nRF8001 on the shield which is the server, my phone/app is the client. What I did so far was to create an Android app which scans for BLE devices. It can connect to a device and

秒懂HC-SR501红外感测器Arduino UNO实作

家住魔仙堡 提交于 2020-01-23 03:58:37
秒懂HC-SR501红外感测器Arduino UNO实作 HC-SR501是怎么运作的? 这个模块的核心实际上是由一个 热电感测器 组成,当这个感测器 暴露在热量下 的时候会 生成能量 ,并转化成电讯号。那么, 也就是说 ,当一个人走进他的感测范围之后,他的移动将被HC-SR501感测到,因为 人体 会不断地 以红外线的形式散发出热量 。所以,HC-SR501也称为 被动式 红外传感器,其本身并 不会主动探测任何目标 除了热点感测器之外,还有一个重要的组成部分叫 菲涅尔透镜 ,这个东西就是用来把红外线 聚焦 到热电感测器,所以理论上来说,没有它应该也能正常运作,不过肯定效能显著下降 HC-SR501模组 如上图所示,这个模组只有三只引脚,除了基本的VCC和GND外,有一个 OUT 引脚,在 侦测 到一个对象时,提供 高逻辑电平 下面两个 橙色 的东西,是 电位器 ,其中一个用来 调整感测器的灵敏度 ,另一个用来 调整在对象被侦测到时,输出信号保持高电位的时间 (可调范围0.3s~5min) 另外,左边还有三个引脚可以两两组成跳线(有些类型不会有跳帽让你接),用来选择 trigger (触发,相当于一种输入信号,用来刺激传感器工作)的 模式 ,接 下面两个 表示 执行不可重复的trigger模式 ,也就是说在感测器输出高电位的延迟时间过了之后,输出会自动从高位拉低;接 上面两个 表示

Can't exchange data between Android phone and Arduino with NFC module, using HCE

你离开我真会死。 提交于 2020-01-23 03:27:06
问题 Please, I need any help to solve my problem. I can't exchange data normally between Android (4.4.2) phone and Arduino with NFC module, using HCE. I took example from Android samples, and slightly changed to return just IMEI number. public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) { if (Arrays.equals(SELECT_APDU, commandApdu)) { String data = ((TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); return ConcatArrays(data.getBytes(), SELECT_OK_SW); }

XTEA encryption in PHP and decryption in C

两盒软妹~` 提交于 2020-01-23 03:12:06
问题 I'm trying to establish communication between a website and an Arduino. I need to authenticate all the messages from my website to the Arduino, so I have found that the less time expensive way is using XTEA cryptography. My PHP code for the website is: mcrypt_encrypt(MCRYPT_XTEA, 'qwertyuiasdfghjk', 'asdfasdf', MCRYPT_MODE_ECB); where "qwertyuiasdfghjk" is a 128 bits key and "asdfasdf" is a 64 bits message. On the Arduino side I'm using: void _xtea_dec(void* dest, const void* v, const void* k

Arduino SD卡和数据记录到Excel教程

痴心易碎 提交于 2020-01-22 16:28:40
在本Arduino教程中,我们将学习如何在Arduino开发板上使用SD卡模块。 另外,结合DS3231实时时钟模块,我们将制作一个数据记录示例,在该示例中,我们将温度传感器的数据存储到SD卡中,然后将其导入Excel以制作图表。 您可以观看以下视频或阅读下面的书面教程。 Arduino SD卡和数据记录到Excel教程 Arduino SD卡模块 首先,让我们看一下SD卡模块。它可以与工作电压为3.3 V的标准MicroSD卡配合使用。因此,该模块具有稳压器和电平转换器,因此我们可以将其与Arduino板的5 V引脚一起使用。 SD卡模块有六个引脚,其中两个用于为模块供电,VCC和GND引脚,另外四个用于SPI通信。我们需要将其连接到Arduino开发板。 原理图略 请注意,每个Arduino开发板都有不同的SPI引脚,应相应连接。 编程Arduino SD卡模块 接下来,我们需要对Arduino进行编程。这是一个简单的代码部分: #include <SD.h> #include <SPI.h> File myFile; int pinCS = 53; // Pin 10 on Arduino Uno void setup() { Serial.begin(9600); pinMode(pinCS, OUTPUT); // SD Card Initialization if

Using classes with the Arduino

白昼怎懂夜的黑 提交于 2020-01-20 17:09:50
问题 I'm trying to use class objects with the Arduino, but I keep running into problems. All I want to do is declare a class and create an object of that class. What would an example be? 回答1: On Arduino 1.0, this compiles just fine: class A { public: int x; virtual void f() { x=1; } }; class B : public A { public: int y; virtual void f() { x=2; } }; A *a; B *b; const int TEST_PIN = 10; void setup() { a=new A(); b=new B(); pinMode(TEST_PIN,OUTPUT); } void loop() { a->f(); b->f(); digitalWrite(TEST