Adafruit 教程:Use the Micro:bit with the Arduino IDE

micro:bit编程、教学、展示
STEM
回复
头像
shaoziyang
帖子: 3917
注册时间: 2019年 10月 21日 13:48

Adafruit 教程:Use the Micro:bit with the Arduino IDE

#1

帖子 shaoziyang »

原帖作者:imhori

来自:https://learn.adafruit.com/use-micro-bit-with-arduino

仅翻译前言部分:   

图片

你知道吗, Arduino IDE 可以用来编程Microbit?现在你还有另一种方式来使用这个酷板!了解如何设置 Arduino 编程您的Microbit, 闪烁一些 led, 阅读内部温度传感器, 通过蓝牙发送和接收数据-甚至日志数据到 Adafruit。  

Microbit是一个给孩子用的小 nRF51-powered 学习平台-你可以在微软 MakeCode (拖放 积木块编程或 Javascript), micropython, 或 mbed中使用它。但我们真的很喜欢使用 Arduino IDE, 特别是因为有数以千计的现有项目, 你可以使用和适应。此外, 你可以有更多的先进的项目, 因为你不会耗尽内存 (正如你在用的 micropython), 你能写任何你想要的代码 (用 MakeCode 更限制了什么已经为你提供的, 一个易用性的权衡)。  

拿起一个 microbit, 并遵循如何你可以做一些非常先进的事情!  

图片

图片

图片

代码: 全选

const int COL1 = 3;     // Column #1 control
const int LED = 26;     // 'row 1' led

void setup() {  
  Serial.begin(9600);
  
  Serial.println("microbit is ready!");

  // because the LEDs are multiplexed, we must ground the opposite side of the LED
  pinMode(COL1, OUTPUT);
  digitalWrite(COL1, LOW); 
   
  pinMode(LED, OUTPUT);   
}

void loop(){
  Serial.println("blink!");
  
  digitalWrite(LED, HIGH);
  delay(500);
  digitalWrite(LED, LOW);
  delay(500);
}
 

回复

  • 随机主题
    回复总数
    阅读次数
    最新文章