Today I figured out how to run a program that we used previously called readTemperature which reads a serial port that contains the data from the weather station. I then typed in a line of python code to save this data into a file on the raspberry pi's SD card. Now we just have to figure out how to get the data from the SD card to the computer where plotly will make graphs with that data.
The following link contains code that will store strings from the arduino to a text file using python. We will have to look more into it on Monday, read what exactly the code does and then compare with what we have done so far.
I spent a lot of time looking for ways to print the time when each set of weather data is printed but every code that I tried today gave me problems. We will work more on this next week as well.
I also wrote code for the arduino that prints out three columns of numbers. The first column is a number starting at 1 and increments by 1 everytime. The second column is a simple calculation, in this case, adding thirty to the previous column. The third is the original number calculated by subtracting thirty from the previous column. This code will hopefully help us format the weather data. I tried combining this written code with the code that prints the weather data to see if I could make the display neater but I am having trouble with this. I close to figuring this out so I will work more with this on Monday.
No comments:
Post a Comment