Notes From JamesNotes From Jameshttp://ghofulpo.com/blog Cheap internet bike racing part 5http://ghofulpo.com/blog/index.php/2010/02/17/0404/Cheap_internet_bike_racing_part_5http://ghofulpo.com/blog/index.php/2010/02/17/0404/Cheap_internet_bike_racing_part_5Wed, 17 Feb 2010 04:04:00 +0100The project is pretty reliable now. I regularly train against previous rides. Having beat a previous time, it's quite exciting and stimulating to try to retain the lead. I have been dropping seconds quite frequently. All I have to do is keep going at it, and I'll be in good condition for a springtime time trial I'm training for.I also have added code to publish the times and distances to IRC. For example:*** #bike 1266376160*** demobiker (~demobiker@xxx.com) has joined channel #bike 900.000000 0.008644 1100.000000 0.010805 1300.000000 0.012966 1500.000000 0.015127The format is:Time in millisecondsDistance in kmEventually, the software will be able to pull in competitors times and display the differences, just as it does with prerecorded times.Here's what I spent so far:$20 for used bike trainer.$3.50 for a female connector, used in the joystick.$1.50 or so for postage. The magnet and sensor was donated.Pretty inexpensive. Hopefully some more people will join in and build similar projects. Cheap internet bike racing part 4http://ghofulpo.com/blog/index.php/2010/02/10/0531/Cheap_internet_bike_racing_part_4http://ghofulpo.com/blog/index.php/2010/02/10/0531/Cheap_internet_bike_racing_part_4Wed, 10 Feb 2010 05:31:00 +0100Looks like the GUI I wrote in GTK seems to be stable, at least in the living room. I need to take it down to the bike. When I was running it yesterday, I got 3km into the ride when the program crashed. What a horrible feeling. I think I had some mutual-exclusion issues with how GTK handles threading. Seems to be stable now, so I'll give it a shot tomorrow. Cheap internet bike racing part 3http://ghofulpo.com/blog/index.php/2010/02/08/0318/Cheap_internet_bike_racing_part_3http://ghofulpo.com/blog/index.php/2010/02/08/0318/Cheap_internet_bike_racing_part_3Mon, 08 Feb 2010 03:18:00 +0100The sensor is hooked up and I've done a few minor time trials. With the data collection feature, I'm able to automatically generate plots of various practice runs.In the above graphic, I have two of my runs, plus one of my son's.Total cost so far: $4.50 (I needed a socket for the connector, bought at Radio Shack). I had the rest of the parts at home, plus the reed sensor was sent by my dad ($1.50 or so, shipping). Support JDRF diabetes research though Pepsihttp://ghofulpo.com/blog/index.php/2010/02/04/1850/Support_JDRF_diabetes_research_though_Pepsihttp://ghofulpo.com/blog/index.php/2010/02/04/1850/Support_JDRF_diabetes_research_though_PepsiThu, 04 Feb 2010 18:50:00 +0100Pepsi has chosen JDRF as one of three participants in the Pepsi Refresh Challenge, an online campaign to fund worthy non-profit projects that impact children nationally. Three charities are aligned with three National League Football League players. Until midnight tonight, people can vote on the NFL’s website (http://www.nfl.com/pepsirefresh) and via text message (text ‘MARK’ to PEPSI (73774) for one of those three players, with the player/charity receiving the most votes over the course of the week receiving a $100,000 grant. Cheap internet bike racing part 2http://ghofulpo.com/blog/index.php/2010/01/31/2303/Cheap_internet_bike_racing_part_2http://ghofulpo.com/blog/index.php/2010/01/31/2303/Cheap_internet_bike_racing_part_2Sun, 31 Jan 2010 23:03:00 +0100For the internet bike racing project, I modified an old Gravis Gamepad Pro controller to have a stereo headphone jack connected to two of the buttons. The plan is to get a reed (magnetic) switch, connect it to the bicycle and have it tripped by a magnet on the rotating wheel. This then acts as if a button was pressed on the joystick, and signals the software to do some processing. Cheap internet bike racinghttp://ghofulpo.com/blog/index.php/2010/01/31/0127/Cheap_internet_bike_racinghttp://ghofulpo.com/blog/index.php/2010/01/31/0127/Cheap_internet_bike_racingSun, 31 Jan 2010 01:27:00 +0100My newest project is a way to race other people with bike trainers on the internet. My goal is to have this as inexpensive as possible - hopefully under $10 or so. I'm not as concerned about fancy graphics or racing courses as much as "am I winning?", and having a reasonable price. So far, I have a simple C program that reads the joystick and calculates the time and distance traveled.Distance (km) = 0.177 Time = 0:00:29.332 km/h = 54.025Distance (km) = 0.179 Time = 0:00:29.452 km/h = 64.830Distance (km) = 0.182 Time = 0:00:29.676 km/h = 34.730Distance (km) = 0.184 Time = 0:00:29.876 km/h = 38.898Distance (km) = 0.186 Time = 0:00:30.084 km/h = 37.402Distance (km) = 0.188 Time = 0:00:30.284 km/h = 38.898Distance (km) = 0.190 Time = 0:00:30.508 km/h = 34.730Not too fancy so far, but data collection seems pretty good. Repairing Wii nunchukhttp://ghofulpo.com/blog/index.php/2010/01/25/0151/Repairing_Wii_nunchukhttp://ghofulpo.com/blog/index.php/2010/01/25/0151/Repairing_Wii_nunchukMon, 25 Jan 2010 01:51:00 +0100Our Wii nunchuk broke. After disassembly, it was obvious that two of the wires in the connector end had broken off. I immediately did a search on the internet for information, and found useful diagrams at wiire.org. The problem I had was that the wire colors I had did not match the colors that they had posted. After disassembling both the controller and the connector, I mapped out the appropriate colors for my particular controller. If you have to repair your Wii Nunchuk, I suggest that you do the same to ensure that the wires are mapped to the correct pins. In particular, on the Wiire site, the red wire was connected to the +3V pin. However, on my controller, the red wire was connected to the clock line.Wiimote Bus Pins (6-pin proprietary connector on Wiimote)Looking into Wiimote (or at the exposed pins on the nunchuk connector):_________| 1 3 5 || 2 4 6 ||__---__|1 (Red wire) - +3V - (Brown on my system)2 (Yellow wire) - Clk (Blue on mine)3 (Red wire) - Attachment detection? (No connection on mine)4 (No wire) - Unknown (unconnected at Nunchuk connector) (No connection)5 (Green wire) - Data - (Red on mine)6 (White wire) - GND - (Yellow on mine)The shield wire (white on mine) was soldered to the metal housing.Wiimote Bus Pins (linear connector on Nunchuk PCB). _ _ _ _ _ _1|_|_|_|_|_|_|61 (Red wire) - +3V - (Brown on mine)2 (no wire) - N/C3 (Yellow wire) - Clk - (Blue on mine)4 (Green wire) - Data - (Red on mine)5 (White wire) - GND - (Yellow on mine)6 (Black wire) - Shield (GND) - (White on mine)Note that the +3v was labeled on the controller board, and was the pin closest to the cable. Another way over verifying this is to note that pin 2 has no wire going to it. Amateur radio in Haiti unsafehttp://ghofulpo.com/blog/index.php/2010/01/23/1625/Amateur_radio_in_Haiti_unsafehttp://ghofulpo.com/blog/index.php/2010/01/23/1625/Amateur_radio_in_Haiti_unsafeSat, 23 Jan 2010 16:25:00 +0100From the ARRL, some amateur radio operators, installing an emergency site at the Dominican Republic's embassy, were fired upon while in a convoy."Within a few hours though, reports via the RCD Facebook page -- confirmed by a long telephone conversation between Hugo Ramón, HI8VRS, and Ramon Santoyo, XE1KK -- reported that the HI8RCD team of eight amateurs were back in the [Dominican Republic] border town of Jimani," Mossop said. "Their convoy, which included other non related Dominicans, was assaulted and one person is reported dead. The radio amateurs are uninjured, but they decided to leave the capital for safety [reasons] and return to the border unescorted. They report the situation as 'extremely unsafe.'"No good deed goes unpunished. Farmville Neighborshttp://ghofulpo.com/blog/index.php/2010/01/21/0002/Farmville_Neighborshttp://ghofulpo.com/blog/index.php/2010/01/21/0002/Farmville_NeighborsThu, 21 Jan 2010 00:02:00 +0100 Amateur radio in Haitihttp://ghofulpo.com/blog/index.php/2010/01/20/1818/Amateur_radio_in_Haitihttp://ghofulpo.com/blog/index.php/2010/01/20/1818/Amateur_radio_in_HaitiWed, 20 Jan 2010 18:18:00 +0100This article at CNN discusses the role that ham radio is playing in the 2010 Haitian earthquake. Start of the biking seasonhttp://ghofulpo.com/blog/index.php/2010/01/17/1912/Start_of_the_biking_seasonhttp://ghofulpo.com/blog/index.php/2010/01/17/1912/Start_of_the_biking_seasonSun, 17 Jan 2010 19:12:00 +0100Start: 6207 km. Did 12km yesterday in the melting snow. Now all I need to do is keep it up. Pants on the Groundhttp://ghofulpo.com/blog/index.php/2010/01/14/0415/Pants_on_the_Groundhttp://ghofulpo.com/blog/index.php/2010/01/14/0415/Pants_on_the_GroundThu, 14 Jan 2010 04:15:00 +0100Pants on the Ground by General Larry Platt is about to be a hit.ATL 10 @ Yahoo! Video Rock for Wishes 2 - New Pichttp://ghofulpo.com/blog/index.php/2010/01/14/0404/Rock_for_Wishes_2_-_New_Pichttp://ghofulpo.com/blog/index.php/2010/01/14/0404/Rock_for_Wishes_2_-_New_PicThu, 14 Jan 2010 04:04:00 +0100 Under the Dome - Stephen Kinghttp://ghofulpo.com/blog/index.php/2010/01/11/0033/Under_the_Dome_-_Stephen_Kinghttp://ghofulpo.com/blog/index.php/2010/01/11/0033/Under_the_Dome_-_Stephen_KingMon, 11 Jan 2010 00:33:00 +0100Has anyone else who has seen the "Under the Dome" novel by Stephen King also seen the 1966 3D movie "The Bubble" (also known as "The Fantastic Invasion of Planet Earth")? The premise, people trapped in a city under a dome and used as an experiment by aliens, seems to have been done before. Blood glucose meter - insidehttp://ghofulpo.com/blog/index.php/2010/01/03/2331/Blood_glucose_meter_-_insidehttp://ghofulpo.com/blog/index.php/2010/01/03/2331/Blood_glucose_meter_-_insideSun, 03 Jan 2010 23:31:00 +0100Page 43 of the December 7, 2009 issue of EE Times has an interesting examination of the internals of a blood glucose meter, specifically the Ascensia Breeze glucose meter manufactured by Bayer AG. What is most interesting is a lack of parts: an NEC 8 bit microcontroller, an ASIC coloumeter, and a 4K serial EEPROM are the only major parts (not counting crystals and capacitors). Looks like they could easily drop the EEPROM and reduce the parts count even further.