Arduino
-เขียนหุ่นยนต์ >>>>
2.บทเรียนออนไลน์ เข้าเรียน http://thecprogrammingproject.weebly.com/
3.ภาษา C++ http://marcuscode.com/lang/cpp
ตัวอย่าง โค้ด
ตัวอย่างที่ 1
#include <stdio.h>
int main()
{
int b;
printf("Hello CTC And Teacher");
scanf("%d",&b);
return 0;
}
ตัวอย่างที่ 2
#include <iostream>
static const char *str[]={"f","h","t","M","f",NULL};
int main()
{
int Check;
do
{
std::cout<<"\n1. f\n";
std::cout<<"2. h\n";
std::cout<<"3. t\n";
std::cout<<"4. M\n";
std::cout<<"5. f\n";
std::cout<<"9. Exit\n";
std::cout<<"Input Key : ";
std::cin>>Check;
if(Check >=1 && Check<=5)
std::cout << "You live in " << str[Check-1] <<std::endl;
}while(Check !=9);
return 0;
}
ตัวอย่างที่ 3
#include <iostream>
using namespace std;
int main()
{
float number_1,number_2,result;
char choice_operator,choice_continue;
do
{
system("cls");
cout << "Enter Number : ";
cin >> number_1;
cout << "Enter Number : ";
cin >> number_2;
cout << endl;
cout << "Select Operator" << endl;
cout << "A)ddition (+)" << endl;
cout << "S)ubtraction (-)" << endl;
cout << "M)ultiplication (*)" << endl;
cout << "D)ivision (/)" << endl;
cout << "You Select : ";
cin >> choice_operator;
cout << endl;
cout << number_1;
switch(choice_operator)
{
case '+' :
case 'A' :
case 'a' : cout << " + ";
result = number_1 + number_2;
break;
case '-' :
case 'S' :
case 's' : cout << " - ";
result = number_1 - number_2;
break;
case '*' :
case 'M' :
case 'm' : cout << " * ";
result = number_1 * number_2;
break;
case '/' :
case 'D' :
case 'd' : cout << " / ";
result = number_1 / number_2;
break;
}
cout << number_2 << " = " << result << endl << endl;
cout << "Continue (Y/N) : ";
cin >> choice_continue;
}
while(choice_continue == 'Y' || choice_continue == 'y');
cout << endl << "Exit Program...";
cout << endl << endl;
system("pause");
}
เอกสารเพิ่มเติม
http://www.vcharkarn.com/varticle/18065
การใช้งานโปรแกรม Circuit Wizard
ใบงานที่ 1 วงจรไฟกระพริบ โดยใช้ทรานซิสเตอร์
ใบงานที่ 2 การออกแบบวงจรไฟกระพริบ โดยใช้ IC 555
ใบงานที 3 วงจรขยายเสียง