این مثال برای استفاده با طرح پردازش طراحی شده است. پردازش یک محیط برنامه نویسی متن باز است. برنامه روی کامپیوتر حسگرهای برد Esplora را می خواند و زنگ و LED RGB را از طریق یک رابط گرافیکی کنترل می کند. تصویر موجود در برنامه Processing برد Esplora را منعکس می کند، بنابراین نسخه مجازی برد خود را خواهید دید.
اگر Processing را روی رایانه خود نصب نکردهاید ، میتوانید این مثال را نیز آزمایش کنید که مانیتور سریال را باز میکند و با دستورات سریال Esplora در تعامل است.
دو طرح پردازشی وجود دارد که با این مثال کار میکند، یکی ساده که حسگرها را به صورت متن چاپ میکند، و دیگری پیچیدهتر که یک نمایش گرافیکی از Esplora را نشان میدهد. اولی ممکن است برای برنامه نویسان مبتدی پردازش بهتر باشد و دومی ممکن است برای برنامه نویسان پردازش پیشرفته بهتر باشد.
فایل فشرده حاوی طرح پردازش ساده برای این مثال را دانلود کنید.
فایل فشرده حاوی طرح پردازش پیشرفته را برای این مثال دانلود کنید.
فقط باید این پوشه را در پوشه Processing Stches خود از حالت فشرده خارج کنید و فایل pde. را در Processing باز کنید.
نرم افزار مورد نیاز
جریان
فقط Arduino Espora شما برای این مثال مورد نیاز است.
برد اسپلورا
کد
این مثال یک رابط سریال را به Esplora باز می کند. شما از برد بخواهید که حسگرها را بخواند یا با ارسال دستورات روی پورت سریال Esplora روی buzzer یا RGB LED بنویسد.
سخت افزار مورد نیاز
برای جزئیات بیشتر: Arduino Esplora Remote
در ادامه، متن انگلیسی این مطلب را میتوانید مشاهده نمایید:
This example is designed to be used with a Processing sketch. Processing is an open source programming environment. The application on the computer reads the sensors on the Esplora board and controls the buzzer and the RGB LED through a graphical interface. The image in the Processing application mirrors the Esplora board, so you’ll see a virtual version of your board.
If you don’t have Processing installed on your computer, you can also test this example opening the serial monitor and interacting with the Esplora trough serial commands.
There are two Processing sketches that work with this example, a simple one that prints the sensors in text, and a more complex one that shows a graphic representation of the Esplora. The former may be better for beginning Processing programmers, and the latter may be better for advanced Processing programmers.
Download the zip file containing the simple Processing sketch for this example.
Download the zip file containing the advanced Processing sketch for this example.
You only need to unzip this folder inside your Processing sketches folder, and open the .pde file in Processing.
Software Required
Circuit
Only your Arduino Espora is needed for this example.
Esplora board
Code
This example opens a serial interface to the Esplora. You’ll ask the board to read the sensors or write to the buzzer or RGB LED by sending commands over the Esplora’s serial port.
Hardware Required
- Arduino Esplora
For more detail: Arduino Esplora Remote
[/membership]