HARDWARE Opensource Arduino POPXT inex SOFTWARE Opensource CC

  • Slides: 93
Download presentation

ตนกำเนด HARDWARE โครงการ Opensource จาก Arduino POP-XT ของ inex

ตนกำเนด HARDWARE โครงการ Opensource จาก Arduino POP-XT ของ inex

SOFTWARE คอมไพเลอร Opensource C/C++ Edit + Compile + Download POP-XT

SOFTWARE คอมไพเลอร Opensource C/C++ Edit + Compile + Download POP-XT

อปกรณ อนพต ปม OK (Digital) Switch (Digital) Reflect (Analog) Distance (Analog) knob (Analog)

อปกรณ อนพต ปม OK (Digital) Switch (Digital) Reflect (Analog) Distance (Analog) knob (Analog)

1 3 2 4

1 3 2 4

COLOR GLCD_RED GLCD_GREEN สแดง GLCD_BLUE GLCD_YELLOW GLCD_BLACK GLCD_WHITE GLCD_SKY GLCD_MAGENTA สนำเงน สเหลอง สดำ สขาว

COLOR GLCD_RED GLCD_GREEN สแดง GLCD_BLUE GLCD_YELLOW GLCD_BLACK GLCD_WHITE GLCD_SKY GLCD_MAGENTA สนำเงน สเหลอง สดำ สขาว สฟา สแดงเขม สเขยว

glcd. Fill. Screen() set. Text. Background. Color() คำสง glcd. Fill. Screen เปนฟงกชนแสดงสพนจอบน POP-XT set.

glcd. Fill. Screen() set. Text. Background. Color() คำสง glcd. Fill. Screen เปนฟงกชนแสดงสพนจอบน POP-XT set. Text. Background. Color เปนฟงกชนแสดงสพนขอความบน POP-XT รปแบบ glcd. Fill. Screen(สพนจอ ) set. Text. Background. Color(สพนข อความ ) ตวอยาง glcd. Fill. Screen(GLCD_WHITE);

ตวเลอก knob POP-BOT XT

ตวเลอก knob POP-BOT XT

#include <popxt. h> void setup() { } void loop() { glcd(1, 0, "Knob value");

#include <popxt. h> void setup() { } void loop() { glcd(1, 0, "Knob value"); glcd(2, 2, "%d ", knob()); }

การใช SW POP-BOT XT

การใช SW POP-BOT XT

การใช ZXSWITCH POP-BOT XT

การใช ZXSWITCH POP-BOT XT

หนยนต void loop() { if(in(22)==0 && in(23)==0) { fd(60); } else if(in(22)==0) { tl(60);

หนยนต void loop() { if(in(22)==0 && in(23)==0) { fd(60); } else if(in(22)==0) { tl(60); } else if(in(23)==0) { tr(60); { else { ao(); } } รถบงค

อานคาผลแสง สะทอน #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); }

อานคาผลแสง สะทอน #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); } void loop() { glcd(1, 1, "L=%d", analog(0)); glcd(1, 1, "L=%d", analog(1)); sleep(100); } : ZX-03

ยกหนยนตขนจากพนแลวม void loop() { if(analog(0)<20) { sound(2500, 500); glcd. Fill. Screen(GLCD_RED); } else {

ยกหนยนตขนจากพนแลวม void loop() { if(analog(0)<20) { sound(2500, 500); glcd. Fill. Screen(GLCD_RED); } else { glcd. Clear(); } } เสยงเต อน

ไมตกโตะ หนยนตเดน void loop() { if(analog(0)<400 && analog(1)<400) { bk(50); sleep(500); sr(50); sleep(500); }

ไมตกโตะ หนยนตเดน void loop() { if(analog(0)<400 && analog(1)<400) { bk(50); sleep(500); sr(50); sleep(500); } else if(analog(0)<400) { bk(50); sleep(500); tr(50); sleep(300); } } else if(analog(1)<400) { bk(50); sleep(500); sl(50); sleep(300); } else fd(50);

หนยนตเดนมาหยดทเสนสดำ #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); fd(60); while(analog(0)>400);

หนยนตเดนมาหยดทเสนสดำ #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); fd(60); while(analog(0)>400); ao(); } void loop() {) แบบท 1

หนยนตเดนมา หยดทเสนสดำดวย #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); fd(60);

หนยนตเดนมา หยดทเสนสดำดวย #include <popxt. h> void setup() { glcd(1, 1, “Press OK“); sw_ok_press(); fd(60); while(analog(0)>400); bk(100); Sleep(100); ao(); } การเบรก

 click on the images to enlarge POPBOT-XT Features: • ATmel ATmega 32 U

click on the images to enlarge POPBOT-XT Features: • ATmel ATmega 32 U 4 MCU, 10 -bit A/D converter with 12 -channel, 32 KB of flash program memory, 1 KB of EEPROM, 2. 5 KB of RAM and 16 MHz clock frequency. • 25 -I/O port and assign to 12 of 3 -pin JST connectors for interfacing with sensors and peripherals • Screw terminal block for battery connections. It supports +4. 8 to +12 Vdc and has an on-board power switch. • +5 Vdc switching regulator power supply circuit. Its regulates the supply voltage for microcontroller devices and all sensor ports. • 128 x 160 pixels color graphic LCD stack board. includes KNOB, OK and RESET button. This display board onlu supports line-art graphic, vector graphic, color background and text (no support the image file). • 8 -Universal port support Analog input functions and Digital input/output function; A 0 to A 7 (18 to 23, 4 and 6 digital pin) • I 2 C bus port; SDA (2) and SCL (3) • UART port; Rx. D (0) and Tx. D (1) • 2 -ch. DC motor driver with indicators. Supports motor voltage of 2. 5 to 13. 5 Vdc. • 3 -Servo motor output; connect with the digital port 30 (SV 1), 12 (SV 2) and 13 (SV 3). • Piezo speaker connections. It is connected with digital port 11. • LED power and Low battery indicator • Direct USB port connection for communication and upload the running code • ISP pad for upgrading and firmware recovery by using the external In-System Programming (AVR-ISP mark II from Atmel is recommended)