Android Control Arduino Microcontroller Board with 8 devices via Internet

Started by fongwe, February 04, 2013, 01:21:10 PM

Previous topic - Next topic

fongwe

Android Control Arduino Microcontroller Board with 8 devices via Internet

http://androidcontrol.blogspot.com/2013/02/android-control-arduino-via-internet.html

Specification

1. Android control Arduino Microcontroller Board via Internet Web Server ( JSON )
2.Arduino Microcontroller Board connect Internet Web Server ( JSON )
3.Web Server use MySQL database and php code



Hardware
1.Arduino UNO Microcontroller Board. or Compatible Board.
2.Arduino Ethernet Shield.
3.Relay Board



more info
http://androidcontrol.blogspot.com/2013/02/android-control-arduino-via-internet.html


BaKu

รบกวนสอบถามหน่อยค่ะว่า ส่วนโค้ดของการเชื่อมต่อ arduino กับ MySQL เป็นยังไงเหรอคะ ขอตัวอย่างโค้ดหน่อยได้มั้ยคะ ขอบคุณค่ะ


fongwe

ใช้ JSON ติดต่อกับ Web Server นะครับ

moochat


akiraten

Quote from: BaKu on March 02, 2013, 12:53:40 AM
รบกวนสอบถามหน่อยค่ะว่า ส่วนโค้ดของการเชื่อมต่อ arduino กับ MySQL เป็นยังไงเหรอคะ ขอตัวอย่างโค้ดหน่อยได้มั้ยคะ ขอบคุณค่ะ

Implement บนชั้น application layer เลยครับ

1. ถ้าง่ายก็ชั้นบนสุดของก็ HTTP ใน arduino ส่ง method POST และตามด้วย query string เช่น lolcahost/logger.php?value=200&value2=1
2. ยากหน่อยก็ Handle TCP เองใน layer ที่4 Transport Layer โดยเขีัยน php เปิด port เพื่อทำการ listener client ที่เข้ามา จากนั้นก็รับค่าที่ส่งมาจาก client หลักการณ์ประมาณนี้ครับ ตัวอย่าง ที่ผมทำไว้ http://www.10logic.com/php-programming/php-socket-on-ubuntu-10-4.html

เพิ่มเติมค้นหาคำว่า php socket , php listener socket port

OSI Layer
http://compnetworking.about.com/od/basicnetworkingconcepts/l/blbasics_osimod.htm

;D
เว็บบล็อกคนพันธุ์ตรรกะ เพราะชีวิตมีมากกว่า 0 และ 1
http://www.10logic.com

fongwe


samira

รบกวน จขกท ช่วยอธิบายให้หายข้องใจหน่อยครับ ตรง diagram ของการติดต่อ ในหัวข้อกระทู้เลย ตรง arduino-relay ที่มีลูกศรไปยัง internet นั้น

ควรจะเป็นว่า arduino-relay นั้น ลูกศรควรจะ ( หรือน่าจะ) ชี้ไปยัง webserver หรือเปล่า ???

ผมงงตรง flow ของการทำงาน
ขอบคุณ
" If you're born poor, it's not your mistake. But if you die poor, it's your mistake"
Bill Gates.