2016年4月17日 星期日

Arduino Smart Car V3.0(手機藍芽遙控多功能自走車V3.0)


  Base on Smart Car V2.0 to modify theUltraSonic portion.Add one servo(MG 90s) to check turn left or turn right when close the barrier.


See the previous Smart Car design:
http://arbu00.blogspot.tw/2015/11/arduino-btsmartcarv2-v20.html
 To connect Servo signal on D13 pin.

Download 3DP things from below website:
http://www.thingiverse.com/thing:1497224


Below source code just to reference ,it can work normally,but not yet perfect.
Download the new Arduino source code:
https://github.com/Ashing00/Smart_Car-V3.0/tree/master




2016年4月9日 星期六

Make the trible layer MAZE By 3DP(使用3D列印機製作三層陷阱迷宮)



  This maze have 3 layer ,Layer A and Layer B are the normal maze and Layer C is a trap layer
 Put a iron bell and try to find the way from  Entrance (A)  to Exit (B) .see the <Picture 6>

  Using your hand to control theiron bell and be careful that there are a lot of dead holes on the way.The squae hole are the dead holes.When the iron bell drop in.It will drop into trap layer C,then the game is over.
  You  need to get the iron bell from DEAD hole,then replay it again.The circle hole is right way to enter another maze layer B.On Layer B also have a lot of dead holes.Enjoy!

 Of cause you also can go from B to A.

Download this thing:
http://www.thingiverse.com/thing:1478081


To see below pictures to know how to made it.

<Picture 1> Just combine layer A.B.C .


2016年4月8日 星期五

2016年4月3日 星期日

C語言的指標及實作如何讀取應用程式執行時所附帶的參數


    今天要來介紹C語言的指標,以及如何利用指標來讀取執行應用程式時所附帶的參數.
原始程式碼下載:
https://github.com/Ashing00/pointer01/tree/master

        完整原始碼已放在在上述連結,只不過我是用visual studio 2013的win32控制台程式
去編譯,須注意你的編譯環境是否與我相同,如果使用不同的編譯環境有可能會發生
編譯不過發生錯誤情形,請再自行參考修正編譯錯誤問題,不過基本的原理是一樣的.

      一般來說學習C語言比較有可能遇到兩個較難理解的主題,一個是指標(pointer)另一個遞迴,有關遞迴會在另一篇文章介紹,然而了解遞迴之前最好先了解指標.

     指標(pointer) 簡單的來說就是指向我們電腦記憶體裡的位址(address),而一般我們所知道的
數值或是字元字串等等資料就是存放在這些記憶體位址裡的值(value).這樣的一個觀念在以前X86系統的組合語言裡反而是部會有太大的困擾的,因為學習組合語言必然要知道定址的方法
所以也必然會知道現在存放在暫存器如EBX,EDX的到底是位址(address)還是值(value).
    那C語言其實就是用指標(pointer) 來達到可以存取位址(address)的方法,只不過可能
是因為資料型態定義的方式在使用上容易跟原本的數值字串等等取值的資料型態搞混.
要搞懂它最好的辦法還是實機操作,底下的範例程式利用printf 的功能來一步步確認區分
究竟現在是位址(address)還是值(value).

    首先必須先知道C語言裡定義的兩個符號一個是*,另一個是&.
&指的是取出這個資料型態所存放值(value)的位址(address) 所在.
 所以他應該得到一個位址(address).

例如 pointer.c 宣告 一個int DataA  數值變數並給他初始值55.
當使用adr1 = &DataA; 這樣的敘述時我們可以指定存放數值55的這個記憶體位址給adr1
  於是adr1可以得到這個數值(value=55)存放的位址(address),請看圖一的說明.

*指的是從指標(pointer) 所存放的位址(address)去取出值(value),也就是它應該得到的是
 一個值(value),然而有趣的是在多重指標裡這個取出的值(value),本身也可能是代表指向另一地方的位址(address).請看圖一的說明再配合程式的執行.

<圖一> 底下應是偏移4位元組 <筆誤> 



2016年3月17日 星期四

Build the light sword with 3DP+Arduino(用3D列印+Arduino製作光劍)


    I used 3DP and arduino Nano to build the light sword.

There are 4 kind of LED blink modes.Just press buttom to change LED blink modes.
When you wave the sword, it can beep.




2016年3月14日 星期一

關於我的3D印表機以及如何進入3D列印世界


     依我個人使用3DP大概近一年經驗,其實3DP是很容易故障的,一開始噴嘴堵住是最常見的.
 後來又遇到溫度感測器故障,加熱管故障,AC 插頭太鬆,風扇壞掉,水平校準不對...等等等,幾乎我的機器除了馬達 其他地放都被我拆過了.即使機器本身沒問題,在列印時一開始也會因為對切片軟體參數設置不妥而造成列印品質不佳.
     我使用的3DP是屬於DELTA形式,也有人說三角洲,好處是X-Y平面比較不占空間,底下有幾張圖是我這一年來慢慢改機後的照片,原本控制器跟擠線器都是放在下方,現在都把它改到上方,有趣是我直接把我的3DP塞進IKEA的書櫃裡,大小還剛剛好,捲線軸直接掛在上層書櫃卻也頗為好用又省空間.





    最近有遇到一個下面的error message.狀況是突然印一印就停止,前幾天都還好好的.
 後來發現這是因為thermal sensor 讀不到溫度,一直秀零度,還好我平常都有備用料,更換thermal sensor 之後就正常了.


圖 :出現這個錯誤訊息,可以檢查一下thermal sensor 是不是脫落了或是線斷了



2016年2月10日 星期三

Building a robot ant with 3DP.


It is easy to build a robot ant just using 3 servo .


Material prepare:
1.Arduino nano  x1
2.MG995  servo x3
3.bread board x1
4.some line.
5,Led or spearker (optional)
6.18650 battery x2

Step 1:
download 3DP components from below website:
http://www.thingiverse.com/thing:1332590


Step 2: Dowload Arduino source code from below :
https://github.com/Ashing00/robot_ant/tree/master


Step 3:Arduino circuit connecting.
  1.Connect 3 SERVO signal pin to Arduino D2/D3/D4
 2. Connect speaker +pin to Arduino D5
 3.Connect Led +pin to Arduino  D6.


2016年1月10日 星期日

Using Android Mobile Phone to control House's Lamp (使用Android手機控制家用電燈)




I Put 2 Servo SG90 into this box and use android Mobile Phone to control House's Lamp
Thru Arduino+BT without any relay.You don't need to change your house original circuit
just plug in this box  original Lamp Switch.This box is for 2 Power Switch .and I used the
 generic mobile Phone USB changer as power source.

2016年1月9日 星期六

Arduino 5 Axis Robotic_Arm V2.0 (Arduino 五軸機械手臂)


  This is a 5 Axis Arduino Robotic Arm with 2 controlled method.
1. one is auto mode by programming in arduino nano chip
2 another is manual mode by using Joysticks.



    This page show you how to connect the arduino circuit,
Regarding how to download 3DP components and how to assemble it .
please see below website.

http://arbu00.blogspot.tw/2015/12/roboticarm-v20-arduino_23.html.


and below can download the Arduino source code for Robotic Arm.<roboticArm1_1.ino >

https://github.com/Ashing00/Arduino_RoboticArm/blob/master/roboticArm1_1.ino


2015年12月26日 星期六

ESP8266 WIFI(4) -Soil_Humidity sensor



   接下來要介紹Arduino+ESP8266的一個應用範例,
從Arduino 讀取土壤濕度感測器的濕度以及POWER及ESP8266的電壓
透過ESP8266 wifi連線,把資料送上//http://api.thingspeak.com
Thingspeak 是一個可以免費註冊的網站,我們只要把資料送到該網站
即可在該網站監控我們所作的土壤濕度感測器的濕度及電壓.




Arduino 範例程式下載:
https://www.dropbox.com/s/ah21knzmc08ip5h/esp8266_soil.ino?dl=0