LBB Notebook / Andrew's diary
29 June 2005:
Well i finally got around to learning a version control system. Was a bit scary when i realized i have to become both an admin and a user having no experience with it whatsoever. Luckily the subversion book is quite good and everything went smoothly and quickly. Except i couldn't get the server to run from inetd so made it it's own daemon.
Which means no more xx-xxx-xxxx versions. Good thing i guess since now i can (probably) worry less about making bad changes and instead of making copies for working versions i can make copies for download. Cool.
I actually updated the documentation. That's really unexpected (it wasn't as hard as i thought it would be).
Made my first release. Will call it stable :) on freshmeat. Version 0.9. Hey, after 2 years it better not be 0.1!
Will have to make a makefile that will copy the documentation to /usr/doc. Maybe.
27May2005:
Made a nice makefile. The make install target works and I even have a make uninstall like any good makefile should.
Wow, the new ph probe works. At least I think 7,5 is the ph :) Things are just rolling now!
26May2005:
Finally have some time to work on the pasco. Today made my first gtk app that changes an image in the window (picture of a digit). I now have to make damn sure my library works when installed (in /usr/lib or whatever) and then make my gui temperature program. Should be easy and fun :)
John brought a couple of new ph probes so will have to get one of them working too.
22Feb2005:
Made my own read and write functions so that the reverse order of bytes will stop waisting my time. This is why startSampling() wasn't working, the sampling period was being set to something much bigger then 100 :)
The ph probe i got is weird. It acts like a bloody motion sensor. It shows 2.something when is stay still but the moment i move the readings start jumping around. Will have to try to move the whole thing farther from me, my monitor or any other device. I don't think it's em though, at least not em bursts. Shorting a weak power supply makes no difference.
Don't like mono. Got windows errors when trying to compile gtk# on slackware. Forget it. Unless all developement of gtk/gtk+ is dropped, that's my choice of the best widget set. Am learning it now (slowly).
27Jan2005:
The guy who reviewed my project before adding it to the freshmeat database said it's not obvious what licence the software is available under.
Spent some time reading Stallman's rant about his LGPL and decided to release it under the GPL. Now I'm really becoming a free software guy, lol.
25Jan2005:
If only everything was so easy... thats what I always say when I realize things are much easier then I expected them to be. Who would have thought that the distance probe is an actual sonar and that the reading I get from the lbb is exactly the time in microseconds it takes the sound to hit the wall and come back? Now I can be proud of my achievements. Both the temperature probe and the distance probe work. GUI soon? I have gotta learn GTK.
27Oct2004:
Woohoo! I'm getting somewhre now. For a long time (months) I was stuck trying to figure out why I'm getting a Laplace transform out of the lbb when all I needed was a simple linear function. All I had to do was print the 16 bits that make a reading and now it's so damn obvious. A reading looks like this: 0000 0010 1111 0000. The Laplace happned because read() wasn't reading the bytes in the right order. Also note the padding zeroes on the left and right. I feel too happy to be upset about how long it took to figure this out.
Stuff left to figure out:
1) why i get a duplicate record when i select the channel with gain (1+2+2 bytes)
2) why continuous samplig doesn't work (i'm still doing the oneShotSaple thing)
3) why trigger select breaks the program 4) try a digiral probe (scary)
4) oh this should have been #1: decode the readings i get from the lbb into actual temperature (it looks like reading = 2 x actual temperature.
I should try to remember that Chris and Evan helped me find the problem.
11Sep2004:
How interesting, bad news is much easier to record. So much happened. libsw500-l1.a is almost complete. Two or three functions are too confusing, I will wait for inspiration to finish those. The library seems apropriately packaged. Makefile creates a /dev/pasco link and uses that to compile serial.c. Made a tiny ncurses application for testing. Have to output more debugging info at this stage.
The loop of startSampling() is replaced by a loop of oneShotSample(). This one is supposed to only give you one record, I still don't know why startSampling() doesn't work properly.
John got a nice thermometer from the biochem lab. I will try to plot the relation between changes in readings and changes in temperature. My math is rusty, but it should be a relatively simple equation.
Need to set up the linuxclub-gateway to be a CVS server. Don't want to use the seneca server because of all the restrictions I will surely have to face.
Got an email from a guy in the US interested in my project. Am doing serious upgrades to the cdot website. This notebook will go there.
During the summer wrote a lot of documentation for libsw500-l1. Will post it while trying to complete but at the same time have to remember my classes.
07Apr2004:
Not much good news. School is killing me and i'm afraid i can't finish the project before the semester is over.
It's not all dark though. For one, i started rewriting my functions. The new versions have complete error-checking and are, hopefully, more suited to a library.
15Mar2004:
Almost a month later, i finally made the lbb to send me data records. Though I was trying to do continuous sampling (get a stream of records), it seems I'm doing burst sampling (get one record per start sampling command?).
I will definitely need more documentatioon. Not only to make sense out of what I have now, but also to be able to code for probes.
The lbb sends me 3 bytes in reply to each start sampling command (only need to do the setup once): one byte with whatever, and a short int with what appears to be temperature readings. They behave in a predictable way when i heat up or cool the probe. Too much info to put here, will try to compile a chart.
Also, the trigger select command seems to be screwing things up, so i don't use it right now. iS(a)-->rS-->start-->return 3 bytes
12Feb2004:
Slowly starting to understand the way the lbb communicates with probes. Next week will have finished the drafts for the necessary functions and if i'm lucky, they will work somewhat, that will help me understand.
Coded several functions from Section 4. Though very simple, these are very important. Start, stop, pause, resume and such.
Am a bit worried that the pasco docs might not contain information on how to decode info sent by the probes. Once i get to read from them, I will probably have to figure out what their signals mean.
10Feb2004:
Input select: It appears that the lbb is able to recieve input from more then one probe at the same time. Didn't try very hard to understand how this is possible (mind, it's a simple serial port device), for now I will pretend that it's not [able to ...] and code everything to work with only one input. Thus, the Input Select function is written. Whether it works or not I don't know, there is no way to test it until some latter functions are finished (12, 13, 21 and a read data function).
Am somewhat stuck. Need to knock my head on the wall to figure out what is relevant in the pasco docs. Not today, need to pass my presentations test to make my team happy :) sigh.
09Feb2004:
Rewritte, n the Initialize function, now works ok. Also wrote the Execute function, am now able to put the lbb into ram mode.
The Reset function is coded but doesn't work as well as it might. Am considering writing a function to wait for a couple seconds before getting a byte from the lbb. This is important because sometimes it replies not immediately but in a second or two. Will do that tomorrow.
Bottom line: today was a good day.
08Feb2004:
I messed with the read() and write() functions for a long time now and I learned one thing worth mentioning here:
- For better results, when more then a byte needs to be read or written, the appropriate function needs to be put in a loop and read/write one character per cycle.
So far only the first function (Identify, 0x01) is working in an acceptable way. The second function (Initialize, 0x02) will be rewritten on monday or tuesday to work right. Am planning to use fopen()/fscanf() instead of open()/read() to read the contents of the SW file.
Questions? Bother me at this address: andrew-smith at mail ru
|