ESP8266 测试帖
本帖最后由 szpapas 于 2014-11-30 12:28 编辑串口波特率是9600. 用软串口的Demo。比现在网上的用Debug Serial的方式容易多了,很简单,在此共享一下。
直接在软串口中输入命令,就可以交互的执行AT命令了。
波特率设置成9600.
接线方式:
ESP-01
VCC -------- 3.3V
GND -------- GND
CH-PD -------- 3.3V (加不加10K电阻都可以)
TXD ------ 10// 软串口的RX
RXD -------11// 软串口的TX
UNO的代码:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.println("Goodnight moon!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hello, world?");
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
用来测试温湿度Demo 恩不错,再上点例子,你用的esp8266的固件版本是多少 对了,还有这东西稳定性怎么样,有很多人说稳定性不好,散热量高。 高亮怎么改的?? 本帖最后由 hardstudy12345 于 2014-12-1 12:33 编辑
你好,用了你的代码貌似还是不行。显示的是乱码,不知道怎么回事。看你的截图用的是Windows系统吗?
我的是这个板子
出现乱码
注意波特率,新版本的波特率是115200,
9600貌似是我以前改的一个版本,固件在ocrobot.com下载,如何刷,也有。。。
顺便问楼主,那个软串口丢字符的问题有没有出现? 学慧放弃 发表于 2014-12-1 12:30 static/image/common/back.gif
高亮怎么改的??
应该是mac的吧。。。也想知道win下怎么改。目前再用textlime
Tottiii 发表于 2014-12-1 17:08 static/image/common/back.gif
应该是mac的吧。。。也想知道win下怎么改。目前再用textlime
是的Mac版本的,很早以前修改的。 Cupid 发表于 2014-12-1 09:34 static/image/common/back.gif
对了,还有这东西稳定性怎么样,有很多人说稳定性不好,散热量高。
稳定性不错,测试了5-6个小时,都没有错 Tottiii 发表于 2014-12-1 17:08 static/image/common/back.gif
应该是mac的吧。。。也想知道win下怎么改。目前再用textlime
我的使用极不方便 你在某宝哪儿家店买的?直接上ID号好了。 szpapas 发表于 2014-12-1 18:43 static/image/common/back.gif
是的Mac版本的,很早以前修改的。
修改的是theme.txt 文件
Mac下面是这个文件:
/Applications/Arduino.app/Contents/Resources/Java/lib/theme/theme.txt
# GUI - STATUS
status.notice.fgcolor = #002325
status.notice.bgcolor = #17A1A5
status.error.fgcolor = #FFFFFF
status.error.bgcolor = #E34C00
status.edit.fgcolor = #000000
status.edit.bgcolor = #F1B500
status.font = SansSerif,plain,12
# GUI - TABS
# settings for the tabs at the top
# (tab images are stored in the lib/theme folder)
header.bgcolor = #17A1A5
header.text.selected.color = #005B5B
header.text.unselected.color = #007e82
header.text.font = SansSerif,plain,12
# GUI - CONSOLE
console.font = Monospaced,plain,11
console.font.macosx = Monaco,plain,10
console.color = #000000
console.output.color = #eeeeee
console.error.color = #E34C00
# GUI - BUTTONS
buttons.bgcolor = #006468
buttons.status.font = SansSerif,plain,12
buttons.status.color = #ffffff
# GUI - LINESTATUS
linestatus.color = #ffffff
linestatus.bgcolor = #006468
# EDITOR - DETAILS
# foreground and background colors
editor.fgcolor = #ffffff
editor.bgcolor = #002040
# highlight for the current line
#editor.linehighlight.color=#e2e2e2
editor.linehighlight.color=#804030
# highlight for the current line
editor.linehighlight=true
# caret blinking and caret color
#editor.caret.color = #333300
editor.caret.color = #ffffff
# color to be used for background when 'external editor' enabled
editor.external.bgcolor = #c8d2dc
# selection color
#editor.selection.color = #ffcc00
editor.selection.color = #c08060
# area that's not in use by the text (replaced with tildes)
editor.invalid.style = #7e7e7e,bold
# little pooties at the end of lines that show where they finish
editor.eolmarkers = false
editor.eolmarkers.color = #999999
# bracket/brace highlighting
editor.brackethighlight = true
editor.brackethighlight.color = #006699
# TEXT - KEYWORDS
# e.g abstract, final, private
editor.keyword1.style = #ffd300,plain
# e.g. beginShape, point, line
editor.keyword2.style = #fd9d00,plain
# e.g. byte, char, short, color
editor.keyword3.style = #fd9d00,bold
# TEXT - LITERALS
# constants: e.g. null, true, this, RGB, TWO_PI
editor.literal1.style = #fb628c,plain
# p5 built in variables: e.g. mouseX, width, pixels
editor.literal2.style = #fd9d00,plain
# http://arduino.cc/
editor.url.style = #0000ff,underlined
# e.g. + - = /
editor.operator.style = #000000,plain
# ?? maybe this is for words followed by a colon
# like in case statements or goto
editor.label.style = #7e7e7e,bold
# TEXT - COMMENTS
editor.comment1.style = #0b88ff,plain
editor.comment2.style = #0b88ff,plain
# LINE STATUS - editor line number status bar at the bottom of the screen
linestatus.font = SansSerif,plain,10
linestatus.height= 20
关键速度多块- - 看样子我也想买个玩玩:lol
页:
[1]
2