![]() ![]() Suppose you want to save that data to visualize, use as an outline for a laser cut data guru trophy, compare sensors, etc. Sweet! Now you can “see” the numbers coming through the serial port in two different ways. Saving Data with CoolTerm and Graphing with Excel (or OpenOffice/Google Docs equivalent) ![]() If everything goes well, you should get a quickly scrolling graph that looks something like this: increment the horizontal position for the next reading: clear the screen by resetting the background: at the edge of the screen, go back to the beginning: Line(xPos, height, xPos, yPos) // (x1,y1,x2,y2) Origin located at top left corner MyPort = new Serial(this, portName, 9600) Size(800, 600) // (Width, Height) window size Serial.write(sensorValue) // print bytes to serialįloat xPos = 0 // horizontal position of the graphįloat yPos = 0 // vertical position of the graph SensorValue = analogRead(sensorPin)/4 // read the value from the sensor The next step is to use another program called Processing to visualize this data.Ĭheck out step 4 of the Serial Out Lab. But unless you have Matrix-like visual skillz, these streaming numbers might be hard to keep track of. Okay so now you have data streaming in from your Arduino through your USB cable, and can see the values on the Serial Monitor. With a potentiometer (or other sensor) hooked up to analog pin 0, you should be able to click the magnifying glass icon on the top right of the Arduino screen and see something like this: Serial.println(sensorValue) // print value to Serial Monitorĭelay(50) // short delay so we can actually see the numbers ![]() SensorValue = analogRead(sensorPin) // read the value from the sensor Serial.begin(9600) // initialize serial communications Int sensorValue = 0 // variable to store the value coming from the sensor Int sensorPin = A0 // analog input pin to hook the sensor to Sure you can watch analogRead() values scroll at warp speed on your Arduino Serial Monitor, but what if you want to save that data? Or look at a graph you make in real time instead of numbers? Maybe you want to do some self tracking and visualize your Fitbit stats, or compare two different light sensors or force sensing resistors? In this class I’ll demonstrate two workflows that help us do this…Ĭheck out the Analog In lab. I am strongly considering removing Windows XP, installing Linux Ubuntu, and associated Linux versions of LibreOffice, Arduino IDE, and a terminal program.Sometimes when you’re prototyping a project it’s nice to see what’s going on with your sensors or variables in your code. I’ve tried using and after the browsing to the file name, but get the same result – grayed out “OK”, and no data into Calc. I used LibreOffce version 5.0.3.2 because higher versions do not load on Windows XP, and went back to Hyperterminal because of issues with CoolTerm and Windows XP.ĭoes anyone know if there’s a security setting or something like it in Windows XP that prevents LibreOffice Calc from actually using the “Link to External Data” feature to an updating text file? It does not appear to make any difference if the text file is open or closed. I am currently using Windows 7 Ultimate Service Pack 1 and Windows 10 Home respectively on two other computers with LibreOffice 6.2.7.1 Calc and CoolTerm for Windows, and everything works correctly to log data into LibreOffice Calc. Calc can “see” the text file created by Hyperterminal and set up comma separated columns for data, but when I try to actually use it, the OK is grayed out, no columns are seen, and and of course nothing happens. All programs appear to be functioning correctly independently, however when I use Calc to access data from a Hyperterminal text file that regularly updates, it’s almost like XP does not allow Calc to access the file. I am using Windows XP Professional Service Pack 3, LibreOffice 5.0.3.2 Calc, Hyperterminal, and Arduino Uno to log temperature data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |