arduino

Arduino Python3 script

六眼飞鱼酱① 提交于 2021-02-07 09:44:28
问题 I'm trying to use a Python3 script to control an Arduino Mega. This is a simple script to take a line from the keyboard and echo it back through the Arduino. I started with a working Python 2 script from http://petrimaki.wordpress.com/2013/04/28/reading-arduino-serial-ports-in-windows-7/. I can't seem to get the characters I sent back, which is probably a formatting issue. Is this a formatting issue? unicode to ASCII issue? How do I read/write binary/hex data and ASCII text with Python 3 and

Arduino Python3 script

ε祈祈猫儿з 提交于 2021-02-07 09:43:10
问题 I'm trying to use a Python3 script to control an Arduino Mega. This is a simple script to take a line from the keyboard and echo it back through the Arduino. I started with a working Python 2 script from http://petrimaki.wordpress.com/2013/04/28/reading-arduino-serial-ports-in-windows-7/. I can't seem to get the characters I sent back, which is probably a formatting issue. Is this a formatting issue? unicode to ASCII issue? How do I read/write binary/hex data and ASCII text with Python 3 and

Arduino Python3 script

喜夏-厌秋 提交于 2021-02-07 09:43:02
问题 I'm trying to use a Python3 script to control an Arduino Mega. This is a simple script to take a line from the keyboard and echo it back through the Arduino. I started with a working Python 2 script from http://petrimaki.wordpress.com/2013/04/28/reading-arduino-serial-ports-in-windows-7/. I can't seem to get the characters I sent back, which is probably a formatting issue. Is this a formatting issue? unicode to ASCII issue? How do I read/write binary/hex data and ASCII text with Python 3 and

How can I write a JavaScript compiler for Arduino or similar microcontroller? [closed]

烂漫一生 提交于 2021-02-07 03:57:41
问题 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 6 years ago . Improve this question I realize that this question will raise some eyebrows, and I realize that JavaScript is traditionally an interpreted language, please let me explain: I am software engineer specializing in web applications (.NET stack specifically). As a hobby, I enjoy

Receiving a HTTP POST Request on Arduino

偶尔善良 提交于 2021-02-05 14:15:05
问题 Is it possible to receive a HTTP Post request with my Arduino Uno using a Ethernet shield. I want to make an Android app wich can control me Arduino and I thought the best way to do it is with a HTTP Post Request. There are many posts about 1[Sending a POST Request], but i couldn't found any posts of how to receive HTTP Post request. I just started programming for Arduino but I already made a few apps for Android (I already have the post code for Android done). 回答1: I wanted to read a POST

Receiving a HTTP POST Request on Arduino

*爱你&永不变心* 提交于 2021-02-05 14:12:42
问题 Is it possible to receive a HTTP Post request with my Arduino Uno using a Ethernet shield. I want to make an Android app wich can control me Arduino and I thought the best way to do it is with a HTTP Post Request. There are many posts about 1[Sending a POST Request], but i couldn't found any posts of how to receive HTTP Post request. I just started programming for Arduino but I already made a few apps for Android (I already have the post code for Android done). 回答1: I wanted to read a POST

Receiving a HTTP POST Request on Arduino

末鹿安然 提交于 2021-02-05 14:12:30
问题 Is it possible to receive a HTTP Post request with my Arduino Uno using a Ethernet shield. I want to make an Android app wich can control me Arduino and I thought the best way to do it is with a HTTP Post Request. There are many posts about 1[Sending a POST Request], but i couldn't found any posts of how to receive HTTP Post request. I just started programming for Arduino but I already made a few apps for Android (I already have the post code for Android done). 回答1: I wanted to read a POST

Inexplainable “Error C141: syntax error” In C on Arduino [closed]

久未见 提交于 2021-02-05 11:15:29
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Improve this question I've been getting into programming an Arduino just recently and I'm getting some weird Syntax errors which I dont understand at all in some of my first exercises. Here is the first one: #include <REG552.h> #define LEDS P4; #define SWITCH P5; sbit led1 = P4^0;

STM32开发入门(一)——流水灯

天大地大妈咪最大 提交于 2021-02-03 11:03:28
stm32性能强大,但其开发难度又显著高于Arduino等单片机。本文将通过流水灯程序,介绍stm32开发的一些基本操作。 基本介绍 常见stm的编程方式有三种:寄存器式、标准库式、HAL库式。其中HAL库上手较为简单。本文将以HAL库式为基础介绍。 软件 Keil 5(单片机集成开发环境) STM32CubeMX(自动配置stm32编程的相关文件) FLYMCU(stm32串口下载软件,也可用ST-LINK代替) XCOM(串口监视器) 准备 打开图中的“File”,新建一个stm32项目(“New Project")。 在输入框中搜索自己的stm32芯片,双击创建新项目。 选择左边菜单栏中“System Core”的SYS、GPIO和RCC。 在SYS中选择Debug方式为“Serial Wire”。 在RCC中选择“Crystal/Ceramic Resonator” 点击右边芯片的引脚,可以看到每一个引脚的用法。此处我们选择引脚的“GPIO_Output”(通用型输出)模式。 依次选择每个引脚的模式,在该实验中,我们共需要10个模式为“GPIO_Output”的引脚。设置好后引脚会有绿色标记。 打开“GPIO”,设置引脚的输出模式为“Output Push Pull”(推挽输出模式)。 打开“Project Manager”,编辑文件名称,保存路径。注意设置IDE为MDK

Arduino通讯串口

我怕爱的太早我们不能终老 提交于 2021-02-01 01:48:28
串口是Arduino与其它设备进行通信的接口 所有的Arduino控制板有至少一个串口(又称作为UART或USART)。它通过0(RX)和1(TX)数字引脚经过串口转换芯片连接计算机USB端口与计算机进行通信。因此,如果你使用这些功能的同时你不能使用引脚0和1作为输入或输出 Arduino Mega 有三个额外的串口: Serial 1 使用 19(RX) 和 18(TX) , Serial 2 使用 17(RX) 和 16(TX) , Serial3 使用 15(RX) 和 14(TX); 若要使用这三个引脚与您的个人电脑通信,你需要一个额外的 USB 转串口适配器,因为这三个引脚没有连接到 Mega 上的 USB 转串口适配器, 若要用它们来与外部的 TTL 串口设备进行通信,将 TX 引脚连接到您的设备的 RX 引脚,将 RX 引脚连接到您的设备的 TX 引脚,将 GND 连接到您的设备的 GND, (不要直接将这些引脚直接连接到 RS232 串口 ; 他们的工作电压在 +/- 12V ,可能会损坏您的 Arduino 控制板。) Serial.begin(9600); //开启串行通信接口并设置通信波特率 if (Serial) //表示指定的串口是否准备好 比较囧的是,这个方法只适用于Leonardo和micro的Serial Arduino Mega 特有: if