古人智慧

Just Do it!
上士聞道,勤而行之;中士聞道,若存若亡;下士聞道,大笑之。不笑,不足以爲道。
~ 道德經 41

「實現夢想不是追逐成功,而是在於賦予生命意義,人生中的每個決定與聲音都有其重要含義。」"The key to realizing a dream is to focus not on success but on significance — and then even the small steps and little victories along your path will take on greater meaning."
電視名人-歐普拉·溫芙蕾(OPRAH WINFREY)

搜尋此網誌

Translation

2015年6月5日 星期五

[BananaPro] Scratch for Arduino on BananaPro

最近一直在找題目,主要是以Arduino和3D printer有相關的方向。
看到MIT的Scratch,哇, 真是好物啊!!

腦海裡,這個App可以結合機械手臂,遙控車,機械獸,規劃一些新的指令,那就可以讓小孩學習如何控制這些機器,進而提升意願往更進階的領域研究,讓我們小孩可以在未來更有競爭力。看到台灣電子”慘“業現狀,真是無言。。。


用幫3DP幫BananaPro穿新裝






不多廢話。。Let's get start!

I'm finding something new in Banana Pro recently...
Yes, a tool catch my eyes -- Scratch which is from MIT, it is a good tool for kid to learn the programming!!!
And I also want to use S4A(Scratch for Arduino) to link with Arduino for my kid to learn more about electrical concept.

How to make it works?

My BananaPro run on Lubuntu.
First, login by your account(bananapi or others which you created)

Step1:
Open web-browser and goto http://s4c.cat
download the aspbian (Debian for RaspberryPi) (version 1.5) pre-build image and install it.




















Step2:
請必須安裝Arduino IDE,會安裝USB driver, 不然s4a會連不上Arduino。
Install the Arduino IDE, this is a "MUST" process, I found s4a can't connect to Arduino because the USB driver.

$ sudo apt-get update
$ sudo apt-get install arduino

Step3:
Download the firmware from this link, http://vps34736.ovh.net/S4A/S4AFirmware16.ino














Step4:
Open Arduino IDE, and select the board you coneected to BananaPo USB.
Compile this firmware and upload to Arduino.
You should make sure all of done to upload to Arduino board successfully.

Step5:
Open s4a, if you found that the right  side that the numbers of Analog0~5 always change, that means the s4a was connected to Arduino board correctly.

















Step6:
Programming it in s4a as below, you will find the onboard LED flash.



















簡單的習題: 用搖杆來控制畫面上牛。。。。




總結:
這s4a工具很棒! 不只可以給小孩子學習寫程式,也可以讓我用最快速度測試電路或機器人、手臂等等。

值得再深入研究如何為我未來機器人客製化的s4a指令!!!








沒有留言:

張貼留言