Physical Pixel An example of using the Arduino board to receive data f การแปล - Physical Pixel An example of using the Arduino board to receive data f ไทย วิธีการพูด

Physical Pixel An example of using

Physical Pixel

An example of using the Arduino board to receive data from the
computer. In this case, the Arduino boards turns on an LED when
it receives the character 'H', and turns off the LED when it
receives the character 'L'.

The data can be sent from the Arduino serial monitor, or another
program like Processing (see code below), Flash (via a serial-net
proxy), PD, or Max/MSP.

The circuit:
* LED connected from digital pin 13 to ground

created 2006
by David A. Mellis
modified 30 Aug 2011
by Tom Igoe and Scott Fitzgerald

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/PhysicalPixel
*/

const int ledPin = 13; // the pin that the LED is attached to
int incomingByte; // a variable to read incoming serial data into

void setup() {
// initialize serial communication:
Serial.begin(9600);
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
}

void loop() {
// see if there's incoming serial data:
if (Serial.available() > 0) {
// read the oldest byte in the serial buffer:
incomingByte = Serial.read();
// if it's a capital H (ASCII 72), turn on the LED:
if (incomingByte == 'H') {
digitalWrite(ledPin, HIGH);
}
// if it's an L (ASCII 76) turn off the LED:
if (incomingByte == 'L') {
digitalWrite(ledPin, LOW);
0/5000
จาก: -
เป็น: -
ผลลัพธ์ (ไทย) 1: [สำเนา]
คัดลอก!
Physical Pixel An example of using the Arduino board to receive data from the computer. In this case, the Arduino boards turns on an LED when it receives the character 'H', and turns off the LED when it receives the character 'L'. The data can be sent from the Arduino serial monitor, or another program like Processing (see code below), Flash (via a serial-net proxy), PD, or Max/MSP. The circuit: * LED connected from digital pin 13 to ground created 2006 by David A. Mellis modified 30 Aug 2011 by Tom Igoe and Scott Fitzgerald This example code is in the public domain. http://www.arduino.cc/en/Tutorial/PhysicalPixel */const int ledPin = 13; // the pin that the LED is attached toint incomingByte; // a variable to read incoming serial data intovoid setup() { // initialize serial communication: Serial.begin(9600); // initialize the LED pin as an output: pinMode(ledPin, OUTPUT);}void loop() { // see if there's incoming serial data: if (Serial.available() > 0) { // read the oldest byte in the serial buffer: incomingByte = Serial.read(); // if it's a capital H (ASCII 72), turn on the LED: if (incomingByte == 'H') { digitalWrite(ledPin, HIGH); } // if it's an L (ASCII 76) turn off the LED: if (incomingByte == 'L') { digitalWrite(ledPin, LOW);
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 2:[สำเนา]
คัดลอก!
พิกเซลทางกายภาพ

ตัวอย่างของการใช้บอร์ด Arduino ที่จะได้รับข้อมูลจาก
คอมพิวเตอร์ ในกรณีนี้บอร์ด Arduino เปิดไฟ LED เมื่อ
ได้รับตัวอักษร 'H' และจะปิดไฟ LED เมื่อมัน
ได้รับตัวอักษร 'L'.

ข้อมูลที่สามารถส่งมาจากจอภาพแบบอนุกรม Arduino หรืออีก
โปรแกรมเช่นการประมวลผล (ดูรหัสด้านล่าง) Flash (ผ่านทางอนุกรมสุทธิ
พร็อกซี่), PD หรือแม็กซ์ / MSP.

วงจร:
* LED เชื่อมต่อจากพินดิจิตอล 13 ถึงพื้นดิน

สร้าง 2006
โดยเดวิดเอ Mellis
การแก้ไข 30 สิงหาคม 2011
โดยทอม Igoe และ สกอตต์ฟิตซ์เจอรัลด์

โค้ดตัวอย่างนี้อยู่ในโดเมนสาธารณะ.

http://www.arduino.cc/en/Tutorial/PhysicalPixel
* /

const int ledPin = 13; // ขาที่นำถูกแนบไปกับ
int incomingByte; // ตัวแปรในการอ่านข้อมูลแบบอนุกรมเข้ามาใน

การติดตั้งเป็นโมฆะ () {
// เริ่มต้นการสื่อสารแบบอนุกรม:
Serial.begin (9600);
// เริ่มต้นขา LED เป็นเอาท์พุท:
pinMode (ledPin เอาท์พุท);
}

โมฆะห่วง () {
// ดูว่ามีข้อมูลแบบอนุกรมที่เข้ามา:
ถ้า (Serial.available ()> 0) {
// อ่านไบต์ที่เก่าแก่ที่สุดในบัฟเฟอร์อนุกรม:
incomingByte = Serial.read ();
// ถ้าเป็น H ทุน (ASCII 72 ) เปิดไฟ LED:
ถ้า (incomingByte == 'H') {
digitalWrite (ledPin สูง);
}
// ถ้ามันเป็น L (ASCII 76) ปิดไฟ LED:
ถ้า (incomingByte == 'L') {
digitalWrite (ledPin ต่ำ);
การแปล กรุณารอสักครู่..
ผลลัพธ์ (ไทย) 3:[สำเนา]
คัดลอก!
พิกเซลทางกายภาพตัวอย่างของการใช้บอร์ด Arduino ที่ได้รับข้อมูลจากคอมพิวเตอร์ ในกรณีนี้ , Arduino บอร์ดเปิด LED เมื่อได้รับตัวละคร " H " และเปิดปิด LED เมื่อรับตัว " L "ข้อมูลสามารถถูกส่งจาก Arduino อนุกรมจอภาพ หรืออื่นโปรแกรมการประมวลผล ( ดูโค้ดด้านล่าง ) , Flash ( ผ่านทางพอร์ตอนุกรมสุทธิพร็อกซี่ ) , โปรดิวเซอร์ หรือ Max / MSP .วงจร :* LED ดิจิตอลเชื่อมต่อจากขา 13 ดินสร้างปี 2549โดยเดวิด เอ เมลลิสแก้ไข 30 ส.ค.โดย ทอม อีโก และสกอตต์ ฟิตซ์เจอรัลด์โค้ดตัวอย่างนี้เป็นสมบัติสาธารณะhttp://www.arduino.cc/en/tutorial/physicalpixel* /Const Int ledpin = 13 ; / / ขา LED จะติดว่าincomingbyte int ; / / ตัวแปรเพื่ออ่านข้อมูลแบบอนุกรมเป็นขาเข้าsetup() { โมฆะ/ / การใช้งานการสื่อสารแบบอนุกรม :ต่อเนื่อง เริ่มต้น ( 9600 )/ / เรียกใช้งาน LED ขาเป็น output :pinmode ( ledpin ออก )}loop() { โมฆะ/ / ถ้ามีข้อมูลขาเข้า : อนุกรมถ้า ( ต่อเนื่อง available() > 0 ) {/ / อ่านไบต์ที่เก่าแก่ที่สุดในอนุกรมบัฟเฟอร์ :อนุกรม incomingbyte = . read() ;/ / ถ้ามันเป็นทุน H ( ASCII 72 ) , เปิดไฟ LED :ถ้า ( incomingbyte = = " H " ) {digitalwrite ( ledpin สูง )}/ / ถ้ามันเป็น L ( ASCII 76 ) ปิด LED :ถ้า ( incomingbyte = = " l " ) {digitalwrite ( ledpin ต่ำ )
การแปล กรุณารอสักครู่..
 
ภาษาอื่น ๆ
การสนับสนุนเครื่องมือแปลภาษา: กรีก, กันนาดา, กาลิเชียน, คลิงออน, คอร์สิกา, คาซัค, คาตาลัน, คินยารวันดา, คีร์กิซ, คุชราต, จอร์เจีย, จีน, จีนดั้งเดิม, ชวา, ชิเชวา, ซามัว, ซีบัวโน, ซุนดา, ซูลู, ญี่ปุ่น, ดัตช์, ตรวจหาภาษา, ตุรกี, ทมิฬ, ทาจิก, ทาทาร์, นอร์เวย์, บอสเนีย, บัลแกเรีย, บาสก์, ปัญจาป, ฝรั่งเศส, พาชตู, ฟริเชียน, ฟินแลนด์, ฟิลิปปินส์, ภาษาอินโดนีเซี, มองโกเลีย, มัลทีส, มาซีโดเนีย, มาราฐี, มาลากาซี, มาลายาลัม, มาเลย์, ม้ง, ยิดดิช, ยูเครน, รัสเซีย, ละติน, ลักเซมเบิร์ก, ลัตเวีย, ลาว, ลิทัวเนีย, สวาฮิลี, สวีเดน, สิงหล, สินธี, สเปน, สโลวัก, สโลวีเนีย, อังกฤษ, อัมฮาริก, อาร์เซอร์ไบจัน, อาร์เมเนีย, อาหรับ, อิกโบ, อิตาลี, อุยกูร์, อุสเบกิสถาน, อูรดู, ฮังการี, ฮัวซา, ฮาวาย, ฮินดี, ฮีบรู, เกลิกสกอต, เกาหลี, เขมร, เคิร์ด, เช็ก, เซอร์เบียน, เซโซโท, เดนมาร์ก, เตลูกู, เติร์กเมน, เนปาล, เบงกอล, เบลารุส, เปอร์เซีย, เมารี, เมียนมา (พม่า), เยอรมัน, เวลส์, เวียดนาม, เอสเปอแรนโต, เอสโทเนีย, เฮติครีโอล, แอฟริกา, แอลเบเนีย, โคซา, โครเอเชีย, โชนา, โซมาลี, โปรตุเกส, โปแลนด์, โยรูบา, โรมาเนีย, โอเดีย (โอริยา), ไทย, ไอซ์แลนด์, ไอร์แลนด์, การแปลภาษา.

Copyright ©2024 I Love Translation. All reserved.

E-mail: