20
“C Language” Programming Education from Intelligent Robotics Education System RES-485 Robotics Education System

“C Language”Myths: ◦ C Language is difficult. Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Embed Size (px)

Citation preview

Page 1: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

“C Language” Programming Education from Intelligent Robotics Education System

RES-485 Robotics Education System

Page 2: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

“C Language”Myths:◦C Language is difficult.

Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered way of thinking Ex. file input/output function and file struct

◦C Language is not interesting. Induce making a C programming rely on standard input/output

function from beginning to end All it shows is all numbers or characters on computer screens are

boring.

However, C Language is:◦An essential yet fun requirement for IT students.

C Language Programming

Page 3: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Students are more motivated from excitement. To do this:◦Something appealing to their eyes◦ Including Movement, and◦Sound

The best toolare“Robots”

C Programming Learning

Page 4: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Outline of Education Kit◦ Robotics is one of the best educational materials to show and

demonstrate creativity to students.◦ This Creative Robot Kit is designed to give a creative engineering

education as well as programming education for utilizing robots.◦ Fully variable assembly accessories and motors are provided to a make

variable and applicable robot◦ Variable creative modules (different types of sensor, actuator, and

communication module) are included to control robot◦ Provides environment for C Language development and Visual

Programming Language development tool◦ Provides a powerful 3D robot simulation environments◦ Learning the variable configuration designs and self movement control of

robot including robot motion recognition and self detection are possible.

Creative Robot Kit

Page 5: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Specifications of Robot Platform: HOVIS-Lite

Creative Robot Kit Include:

World’s first Definitive Mechatronics product that uses both legs or wheels. Can use variable programming tool levels – the next generation humanoid kit with Wi-Fi terminals

HOVIS-Lite Specs:.Size : 348mm(H) x 175mm (W) x 112 mm (D).Weight : 1450g.Degree of freedom : from basic 16 to max 24 extendable.Controller : ATmega128 MCU.Battery : 7.4V 3000mA Li-Po.Sensor : distance detection sensor, PSD, Gyro sensor (optional).Remote : IR Remote, ZigBee (optional).Software : DR-Sm (3D Motional simulator), DR-Visual Logic (task editor).Expandability: DRS-0201 (24kgf.cm) compatible, Full cover (optional), Omni Wheel conversion (optional), 3.5”MD (optional), Red, Blue, yellow colors

Page 6: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

MajorComponents◦RobotPlatform: HOVIS-Lite Motor

Major assemblyparts

Creative Robot Components

Servo motor: 16ea

Page 7: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

◦RobotPlatform Major assembly parts

Creative Robot Components

Page 8: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Intelligent Modules◦ Sensor modules

Ultra Ray Super sonic (distance measure) Gas detection Color detection Brightness detection Motion detection (Gyro sensor/acceleration

sensor) Distance sensor (PSD) Altitude sensor Touch contact detection Human body contact detection Bearing measure (Terrestrial magnetism) Temperature/Humidity measure Non contact temperature measure CIS Camera (Optional) GPS (Optional) Pressure measure (Optional)

Creative Robot Components

Page 9: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Specification Actuator Module

High brightness LED Dot matrixLED Piezo Voice recognition/synthetic

(optional) OLED (optional)

Creative Robot Components

Communication Module Zigbee (optional) Bluetooth (optional) Wi-Fi (optional)

Page 10: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Playing with Robots makes learning the C Language fun!

C Language Education from Creative Robot Kit

#include<stdio.h>

void main(){int a, b;

printf(“input 2 numbers-> “); scanf(“%d %d “,&a, &b);

if(a>b)printf(“max = %d\n”, a); elseprintf(“max = %d\n”, b);}

Input 2 numbers-> 8 5Max number = 8

#include<stdio.h>

void main(){int Light;

Light = light_sensor(); /* illumination inten-sity sensor*/

if(Light>100) dot_LED(7); /* smile */ else dot_LED(8); /* crying */}

Extracted sample from a C language textbook

Page 11: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

C Language Programming from Robot◦ C Language outline (C Language data format)

C program structure/data format (variable and constant) C language development environments (complier and robot) installation and start

initial drive

◦ Standard input/output function and robot control function Talk to robot using standard input/output function Robot control (look control, motor rotation) using robot function

Rotation defined as X degree Make robot to smile Turn on robot warning LED

◦ Operator and expression Robot motor and LED control by operator and expression

Input integer and real variables through sensor Integer and real variables operation and control LED, Dot-Matrix LED and motor

◦ Control flow I : if statement (if,switch) Control motor and intelligent module by select the condition of sensor input

Robot to sensedarkness by brightness sensor Robot to smell by using gas sensor

C Language Education from Creative Robot Kit

Page 12: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

C language programming from robot◦ Control flowII : if statement (for, while)

Realization examples of continuation robot movement by loops statement Drive quadrangle of wheeled robot 2 leg robot walking forward

◦ Function definition and useI : basic concept Basic robot movement function by if statement

Making 2 leg robot function for walking forward Making wheel robot function for forward/backward, left turn and right turning

◦ Function definition and use II : robot movement function definition Complex function using selective and reparative statement

Making forwarding movement function if contacted robot Making Motor control function react to human body sensor

◦ Recursive function and storage class Robot control using recursive function

Control LED and Motor using recursive function

C Language Education from Creative Robot Kit

Page 13: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

C Language programming from robot◦ Array

Robot consecutive action using array Piezo Musical performance using array Display character arrangement in consecutive order Making Robot consecutive action using array

◦ Array and function Robot consecutive movement function using factor of array

Making singing function usingPiezo Making variable consecutive robot motions by function

◦ Pointer Robot control using pointer

Display sequential characters using pointer Control robot action using pointer

◦ Practical use of pointer Robot control II using pointer

Making Consecutive robot action function using pointer Control color sensor, infrared sensor using pointer Detect obstacle object using distance sensor and ultra sound sensor

C Language Education from Creative Robot Kit

Page 14: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

C Language programming from robot◦ Struct and union

Robot control using struct Detect surrounding environment using struct (with temperature/humidity and

brightness sensor) Robot position detect using struct (with movement, terrestrial magnetism and al-

titude sensor)

◦ Struct array and pointer Robot control using struct array and struct function

Reacting robot from temperature and humidity changing Responding robot from position and location change (bearing, altitude and

position)

◦ C Language applicationI Robot action programming of line tracer

Realize robot of 4 wheel line tracer from acquired C Language programming capabilities

◦ C Language applicationII 4 leg Robot action programming for avoiding obstruct

Realize 4 leg robot using acquired C Language programming capabilities

C Language Education from Creative Robot Kit

Page 15: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Responding Robot against brightness(function, If statement and While loop statement)

C Language Education from Creative Robot Kit

#include<stdio.h>

void robot_go(){

Motor(1, 602); /* Right Leg */ delay(200); Motor(2,602); Motor(3,602); delay(200); Motor(1,512);

Motor(0, 422); /* Right Leg */ delay(200); Motor(2,422); Motor(3,422); delay(200); Motor(0,512);}

void robot_stop(){

Motor(1, 602); /* Right Leg */ Motor(2,602); Motor(3,602); Motor(1,512);}

void main(){int Light;

while(1) { Light = light_sensor(); /*bright sensor*/

if(Light>100) {robot_go(); /* Robot Go */ dot_LED(7); /* smile */ } else {robot_stop(); /* Robot Stop */ dot_LED(8); /* crying */ } } }

Page 16: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Responding robot against brightness change◦ Realize robot action: robot walking forwardand smiling in the case of

higher value detected with brightness sensor◦ Robot stopping with crying expression in less value detected (darker than

previously)

C Language Education from Creative Robot Kit

Page 17: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Line tracer◦ Moving robot according to the line on the floor

Display smiling expression of the dot matrix module when infrared sensor detect black line on the floor while flickingLED module light and moving according to the line.

C Language Education from Creative Robot Kit

Page 18: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

4 leg robot avoiding obstacle with smelling detection

◦ 4 leg walking robot with Self avoiding obstacle and responding to smell Self avoiding obstacle at frontusing ultra sensor andcontinuesmoving.

Detecting gas in the air by using gas sensor.

C Language Education from Creative Robot Kit

Page 19: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

C Language Development Environment

C Language Education from Creative Robot Kit

Page 20: “C Language”Myths: ◦ C Language is difficult.  Typically, C training education includes difficult or unusable contents. Also it uses grimmer-centered

Graphic Language Development Environment

C Language Education from Creative Robot Kit

Programming by graphic language and displays C Language after translated