Saturday, October 31, 2009

CPU usage. Is it a problem?

This is why I chose to do my start time a little differntly than the way Time Lapse currently waits until a specific time for the purpose of frequency. The screenshots are self-explanitory. I don't really know if the high CPU usage really matters or not. Please give me your opinion. If it is a problem, it would be easy to fix.







You can see the problem in the first few lines of the run method



I wrote my code a little differnly for start time so I could avoid this problem. Should I change my code to be consistant with this? Or should I change this to fix the problem and be consistant with my code? Is this actually a problem?


I think I'll just ignore this for now.

Thursday, October 29, 2009

Adding start stop time functionality

Today we were working on figuring out how to actually add the start-stop functionality. We figured out how to interact with the user interface through glade. I wrote a line of code to print the date in the end date calendar when the begin collecting button is clicked to try this out, and we started looking at python's time and datetime to figure out the best way to start and stop data collection at a particular time.

Tuesday, October 27, 2009

Working on Timelapse.glade to add start and stop times

Today we worked on making the user interface for the new timelapse. This involved working with and learning glade and seeing how things looked on the XO. At the end of the day this is what we had:



now we need to figure out how to actually add the start and stop times and link it to the user interface. We also need to make any changes to the user interface that we overlooked as we go along

Monday, October 26, 2009

Timelapse.glade still doesn't look right in glade on my computer but nevertheless I maniged to add some calendars for dates and dropdowns for hours and minutes. Here is a screen-shot:

This is a screenshot from running timelapse.py on my computer. This layout doesn't currently work on the XO which is the only thing it needs to work on.


Note: I'm working on the user interface for start and stop functionality before I have actually added start and stop functionality. Normally I would do that the other way around. But I am working on the user interface first because I think it will be the hardest part of adding start and stop times, mostly because I don't really know glade or pygtk.
This is what the "making progress" version (seen in earlier screen-shot) of Timelapse.glade looks like when opened in glade on my home computer:


My home computer is using Ubuntu 9.10 Beta and Glade 3.6.7
I opened up timelapse in glade here at school and it looked the way it should instead of the way it looked on my home computer. On my home computer all the buttons and windows were lined up in a row. Here they look proper:

School computer glade 3.6.3 Ubuntu 9.04:




Making progress:



(click on the images to see the full size image. I didn't realize it was possible to do that before.)

I am trying to add start and stop dates to timelapse. I started by writing a simple pygtk program so I could look at the calendar widget and see what the calendar looks like by default. I posted a screenshot of that program above.

Next I looked at the timelapse.py code to figure out how I should add the start and stop times. I realized that I will probably want to use glade. I have never used glade so I installed glade and tried to figure out how to use it. I also glanced at a tutorial but didn't actually read any of it yet. I opened up Timelapse.glade and tried to figure out how to add a calendar into the program. It didn't work out quite how I wanted it to. Here is a screenshot.


I was trying to figure out how to add that calendar next to the collect data now button but I failed miserably.

After looking at glade I realized that it may be quite hard to do a popout calendar like we had planed. We may have to settle for a pop-up window or just cram the entire calendar in.

What I need to do now:
  • learn enuph glade and pygtk to create the gui part of the start and stop dates
  • add start and stop dates to gui
  • write code to start and stop recording at spicific times
  • link gui start and stop dates to code that starts and stops recording at specific times.
(I'm not quite finished with outside of class work. I'll do a little bit more this evening.)

Tuesday, October 20, 2009


I am trying to figure out the best way to make a calender for the purpose of adding a start and stop date for data collection in timelapse.

Picture of our ideas:



I emailed Frank Linton to see which ideas he liked the best and to set up a time when we could give him the latest version of timelapse

Tuesday, October 13, 2009

change of plans

Today we started out by figuring out what we need to do to edit measure. We installed git and we downloaded the git repository. Then we talked to Matt and determined that Dr. Linton's main problem was that he didn't have the latest version of TimeLapse. Now we are planning on adding the features to TimeLapse that Dr. Linton wants and getting Dr. Linton set up with the latest version of TimeLapse.

Monday, October 12, 2009

got it working

I couldn't figure out what the problem was so I tried updating the XO and it fixed the problem.

Seeing the Bees

This morning we went to Dr. Frank's house to see the bees. We saw his setup and we learned the purpose of the programming we are going to be doing. We also learned a lot of interesting stuff about bees. Jeff's blog entry, The Magic of Bees, explains more about what we saw

Sunday, October 11, 2009

Trying to figure out connection problem

I tried to ssh into the XO pc on my home network but still had no luck. I thought the usb ethernet adapter might not be working so I tried it on my home computer but it worked immediately without a flaw.

Tuesday, October 6, 2009

Determining the best development environment

Today we were trying to determine the best development environment for measure. After talking on #sugar we determined that it would be best to develop on the XO laptops themselves and ssh into the laptops to edit the code. To do this Jeff gave Robin and I XO laptops and USB Ethernet adapters to use for this course. Robin had no problems using ssh with his XO and Ethernet adapter, but I could not connect to the network with my XO and Ethernet adapter. Class ended before I had time to troubleshoot the problem.

The following picture shows how we are going to access and work on the measure activity: