翻翻零件庫,哇!有兩個Joystick,太開心了。。。。
一般我的做法是先用麵包板做實驗,把電路模擬一次,確定無誤後再施工會比較不浪費時間。
想洗PCB,但是DIY的材料與工具還在海峽對岸,所以繼續用洞洞板來施工。
把這些零件試擺一下,用油性筆把大小畫出來,然後用美工刀在洞洞板的正面背面畫上幾刀,就可以折下來。
然後,就一條條開始“努力”的用烙鐵來焊接。
老花越來越嚴重,戴眼鏡+放大鏡都還很吃力的說。。。
花了兩個小時,出爐了,開心!!!
《正面》
《背面》
《側面》
遙控器的藍芽材料還沒到手,只好先透過Macbook的BT與蜘蛛robot連接。
材料到手後再想想如何加上電池與BT。
遙控器的code寫好後,上傳到arduino
看來效果還不錯,準備與蜘蛛robot做第一次接觸。
心得:
以為搖杆的software應該很簡單,實驗的結果按鍵的debounce處理最麻煩。
如果沒有好好處理debounce的部份,按鍵很容易產生誤動作。
經過多次試驗,用timer+interrupt是最佳的解決方案。
我用timer2的ISR(Interrupt Service Routine)來偵測這兩顆按鍵,每10ms做一次,如果在100ms持續按著,那就認為按鍵確立。
X/Y軸的控制也很麻煩,參考同好的做法
dir = atan2(Y/X)
speed = sqrt(pow(X, 2) + pow(Y, 2))
這樣就可以用搖杆控制方向與速度,軟體開發真的是複雜。。。
2015-09-05
遙控器結構設計
硬件與軟件完成了,接下來就是設計結構。
照慣例,用Sketchup做3D建模
當印出來後發現忘了在主板下面加個支撐,不過,尺寸還抓的很準。
上次印蜘蛛的結構發現噴頭有堵塞的情況,這次我已經把噴頭清潔過了,印得很好。
組合後好看!!而且可以把這兩個搖杆好好固定住,好用,3D打印機真是好夥伴!
2015-09-06
Python simulation
Python的code改為接收遙控器的UART port,然後計算搖杆的角度與強度,就可以控制蜘蛛robot的方向與速度。
我先用右邊的搖杆做實驗,視頻分享:
可以看出,搖杆移動越大,速度越快。。。。
porting到蜘蛛robot就是這樣的效果,可以用搖杆控制方向與速度,好玩!!!
《另一個拍的比較穩定的視頻》
然後,IR避障器也有作用,手一靠近,蜘蛛robot就向後躲,
閃幾次後不爽,還往前衝!!!
真好玩!!!
好順暢的動作,真厲害。
回覆刪除可以在腳的下端套上一段橡膠管,這有有止滑效果與少許避震,移動起來會更順暢。
Hı regıshsu.
回覆刪除Can you give shematıcs and codes?
rusenyyc@gmail.com
作者已經移除這則留言。
回覆刪除Hallo regis,
回覆刪除it is awesome, is there any possibility you could give me the code?
Thanks a lot.
Lillianguan49@gmial.com
可以跟您要搖控器的arduino code嗎?這太酷了!但我寫不出來!感謝
回覆刪除julshow423@gmail.com
Friend can you give me that code because lmaked a spider robot.but I have not code for remote. Can you give me that code.my gmail nhdarckshadow2001 @gmail.com
刪除Friend can you give me that code because lmaked a spider robot.but I have not code for remote. Can you give me that code.my gmail nhdarckshadow2001 @gmail.com
刪除Friend can you give me that code because lmaked a spider robot.but I have not code for remote. Can you give me that code.my gmail vinhhoquang206@gmail.com
刪除Hi Regis
回覆刪除My spider is walking! Thanks for sharing the design, it is a fun project. I too would like to ask if you could share the code for the Bluetooth remote transmitter? My email is ArtSuzhou@gmail.com. Thanks.
I would suggest using mobile phone or tablet. please refer to my another project https://www.instructables.com/id/DIY-Spider-Robot-PART-II-Remote-control/
刪除Hi, could you pass the codes and how to run the simulator?
回覆刪除jorge.david.zepmed@gmail.com
Please sir send the remote control all parts in English
回覆刪除Did he sent you the code?
刪除Please sir send the remote control code .thanks
刪除my mail: gassen.taaam@gmail.com
I was able to make it work using the sample dance. I am trying to use a remote made on Blynk but have not been successful. Can I get the code please? amidamarhu@hotmail.com
回覆刪除Hallo regis,
回覆刪除it is awesome, is there any possibility you could give me the code?
Thanks
techtaam@gmail.com
could you give me the raspberry pi code?
回覆刪除This thing is amazing!
回覆刪除Can you send me Arduino Code please?
My email is: danielojestem@gmail.com
Of Can you give shematıcs and Codes?
回覆刪除morad.camera@gmail.com
Regis,實在搞不懂方向怎樣設置,原來都是串口文本命令,要麼左,要麼右。現在是搖杆,左右上下都會有向量。能不能把原代碼這部份發給我學習一下,謝謝!郵箱:stephen.qlf@gmail.com
回覆刪除Is it possible to find somewhere source code for remote control for spider? I can't program it myself. Yours faithfully, Jaroslav
回覆刪除modelkit@atknet.sk
Can you give shematıcs and Codes? scottwiley3@gmail.com Great Job!
回覆刪除Great Job! I am actually building it right now and it´s a lot of fun though I must say it is pushing my amateur limits concerning both 3D-printing and code.
回覆刪除Bạn ơi, bạn cho mình xin code đó được không vì mình làm ra robot nhện. Nhưng mình không có code điều khiển từ xa, bạn cho mình xin code đó được không. gmail vinhhoquang206@gmail.com
刪除Friend can you give me that code because lmaked a spider robot.but I have not code for remote. Can you give me that code.my gmail vinhhoquang206@gmail.com
刪除bonjour Regis,serai t il possible d obtenir les codes arduino pour araignée et emeteur??
回覆刪除en vous remerciant
bernard0057@yahoo.fr