版主: wanchong , wangyu , eepwwp , firedom |
二叔
最后登陆时间:2014-10-23 10:40:53 |
momo2051的原帖 围观 强势围观 让围观来得更猛烈些吧 |
二叔
最后登陆时间:2014-10-23 10:40:53 |
在大Q的指导下,终于起来啦,不过似乎不太对劲
不是说好先hello world的嘛,咋又是blink,关掉,先hello world
String helloString = "Hello World, Hello Uncle Li Technology!"; void setup() { // start serial port at 9600 bps: Serial.begin(9600); while (!Serial) { ; // wait for serial port to connect. Needed for Leonardo only } } void loop() { // put your main code here, to run repeatedly: Serial.println(helloString); delay(10000); } 好吧,下载竟然成功了
打开串口,hello world搞定,终于可以下课啦~
下节课开始讲blink,还有必要讲嘛?二叔听大家的 |
siasjack
最后登陆时间:2014-10-24 11:14:35 |
ciao !
|
eepwwp
最后登陆时间:2014-06-27 17:29:11 |
当然要听啊
|
二叔
最后登陆时间:2014-10-23 10:40:53 |
|
此帖由二叔于2014-10-28 12:51:44最后编辑
|
|
二叔
最后登陆时间:2014-10-23 10:40:53 |
hello world都出来了,还用blink嘛?小爱比树莓好的一点就是和arduino兼容,自带了blink的led树莓还要另外去接,好吧,打开blink成,下载,果真开始闪动啦
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second } blink的效果
好啦,这课就这么结束吧,眼尖的同学可能看到了一张TF卡,好吧,再做一个实验,TF卡读取,同样是打开例子,下载,树莓派的TF卡就被读出来啦。
到这里吧,就到这里,二叔科技,http://2.liub.org
|
Dejia1989
最后登陆时间:2014-10-28 21:03:16 |
MARK!
|
二叔
最后登陆时间:2014-10-23 10:40:53 |
这是个神马意思嘛? |
二叔
最后登陆时间:2014-10-23 10:40:53 |
王鹏你妹啊,爱迪生一用到底层库和arduino都不兼容了~
试着改一下库,时间不一定够 |
二叔
最后登陆时间:2014-10-23 10:40:53 |
Dejia1989的原帖 MARK! 免费围观 |