How to: Graphically Visualize Data in Real Time Як графічно візуалізувати у дані реальному часі

nunchuck-visualization

Although the title of this post may sound a bit advanced or intimidating, fear not grasshopper, data visualization is actually quite simple. Хоча назва цієї посади може здатися трохи складно або залякування, страху не коник, візуалізації даних насправді досить проста. Using an outstanding program called Використання зверненні програма під назвою Processing Обробка , we can read data through our computer's serial port and then display it visually. , Ми можемо зчитувати дані через послідовний порт нашого комп'ютера, а потім показати його візуально.

wiimote2

We'll use a wiimote in this tutorial since they're so many sensors to choose from and you can easily Ми будемо використовувати Wiimote в цьому підручнику оскільки вони так багато датчиків на вибір, і ви можете легко connect it to your pc Підключіть його до комп'ютера and і read data from it читати дані з нього . . If you'd like to graph another type of sensor, you'll use the same methods but probably build your circuit differently. Якщо Ви хочете, щоб граф інший тип датчика, ви будете використовувати ті ж методи, але, ймовірно, побудувати ваші схеми по-різному. Learn about Дізнайтеся про all sorts of sensors всілякі датчики . .

processing
Processing Обробка is the program I use – It's pretty easy to learn, uses the same interface as це програма, я використовую - це досить легко дізнатися, використовується той же інтерфейс, Arduino Arduino , and can render 2D and 3D visualizations with small amounts of code. , І може надати 2D та 3D візуалізації з малою кількістю коду. Before you jump in head first, I suggest you check out Перед тим, як стрибати в першу голову, я пропоную вам перевірити their examples їхній приклад to familiarize yourself with the code. ознайомитися з цим Кодексом.

1. 1. The Code Кодекс

graph

Once your sensors are successfully transmitting to your serial port (learn how to Після того, як датчики успішної передачі з послідовним портом (навчитися send serial data Відправити послідовної передачі даних ), we can use that data to create a graph, thus creating a whole new perspective on our data. ), Ми можемо використовувати ці дані для створення графіка, що створює абсолютно новий погляд на наші дані. To get you started, we'll first just Для початку, ми спочатку просто graph one variable Граф однієї змінної coming in from the serial port. що надходять з послідовного порту. The results should look basically like the image above. Результат повинен виглядати основному як на малюнку вище.

2. 2. Graphing Mulitple Sensors and Inputs Графічні Mulitple датчики та матеріали

multi-variable

Similar to the single variable graph above, we now За аналогією з однією змінною графі вище, тепер ми graph multiple values Граф кілька значень at the same time. У той же час. It's a bit more complicated since we have separate the variables. Це трохи більш складним, оскільки у нас є окремі змінні. To learn more information about multivariable serial communication with arduino, check out the Щоб отримати більше інформації про багатовимірному послідовної зв'язку з Arduino, перевірити arduino site Arduino сайту . .

For non-arduino data visualization, check out some of these Для не-Arduino візуалізації даних, перевірити деякі з цих fantastic examples фантастичний приклад . .

Don't miss out on future articles, subscribe for Не пропустіть на майбутньої статті, підписатися на розсилку free updates безкоштовні оновлення . .

Comment: Коментар:
Byron Morgan Байрон Morgan

April 25th, 2009 25 квітня 2009

Mine doesn't look anything like yours, and I copied and pasted the code *scratches head* Otherwise, Very cool! Шахта не був схожий ваш, і я скопіювати і вставити код * подряпини голови * У противному випадку, дуже здорово!

Joe L Joe L

April 25th, 2009 25 квітня 2009

Yea, the code used to generate the pretty graphs above got misplaced…*woops*. Так, код, який використовується для створення досить графіках, наведених вище отримали недоречні ... Woops *. Sorry about that, I'm in the process of re-writing it, will post it when I'm finished. Вибач, що я перебуваю в процесі переписування його опублікуємо його, коли я закінчила.