Pyweek is coming up. Who is up for some furious game / python coding action?
Here is a bunch of games I've written for past a few previous PyWeek events. For the last few events, I've been unable to finish due to RL commitments. I'm thinking about trying again...
Anyone feel like teaming up?
Sunday, July 19, 2009
Sunday, July 12, 2009
Stupid advice on Batteries
I'm tried of reading stupid, ignorant advice about rechargeable batteries. Eg:
Don't follow this advice, it is wrong wrong wrong. In this age of ultra-portable, battery powered devices, you owe it to yourself to get educated, so don't take my word for it, and especially don't listen to advice like the above. Do some research yourself and get the facts. Having said that, I'll state the facts below, because I think most people won't bother to dig further! :-)
If you want to look after your battery powered device, first you need to find out what sort of batteries it uses. Most modern electronic devices use Lithium-ion batteries, so I'm going to talk about them. Note, this advice applies only to Lithium-ion batteries. These are the sorts of batteries you will find in your cell phone, laptop, iPod or Tesla Roadster.
1. Your battery has a fixed shelf life.
This has a few implications. Firstly, nothing you can do will extend the battery beyond it's shelf life. It will die, even if it is never used. This leads me on to the second point... don't buy a spare battery. When you need it, it will probably be dead, beyond resurrection. Generally, a well-cared-for battery will last five years, losing about 20% capacity per year.
2. Your battery will continue to discharge slowly, even if it is turned off.
Why? It's related to the chemical reactions happening inside the battery. However, the most likely reason is that there is special circuit in your device which monitors the battery voltage. Why do you need such a circuit? Read on.
3. Your battery will be damaged if it is discharged below a certain threshold, or overcharged.
For this reason, most devices have special circuits which measure the voltage of the battery, and turn the device off if the voltage drops too low. As already discussed, if you completely discharge the battery, it will continue to discharge even when it is turned off. This means the battery may in fact discharge to a dangerously low level, where it will become irreparably damaged. It will drastically reduce the life of your battery. Fortunately, the same circuit protects against overcharging, so you will probably never have to worry about that.
The moral of the story. Don't deliberately try to completely discharge a battery. Don't let your device sit around with a flat battery for days on end. Don't buy a spare until you need it.
...as a rule of thumb for ANY rechargeable device you should always charge it fully and drain it down until it dies at least once a month. this will cycle the battery and give you longer lasting batteries.
Don't follow this advice, it is wrong wrong wrong. In this age of ultra-portable, battery powered devices, you owe it to yourself to get educated, so don't take my word for it, and especially don't listen to advice like the above. Do some research yourself and get the facts. Having said that, I'll state the facts below, because I think most people won't bother to dig further! :-)
If you want to look after your battery powered device, first you need to find out what sort of batteries it uses. Most modern electronic devices use Lithium-ion batteries, so I'm going to talk about them. Note, this advice applies only to Lithium-ion batteries. These are the sorts of batteries you will find in your cell phone, laptop, iPod or Tesla Roadster.
1. Your battery has a fixed shelf life.
This has a few implications. Firstly, nothing you can do will extend the battery beyond it's shelf life. It will die, even if it is never used. This leads me on to the second point... don't buy a spare battery. When you need it, it will probably be dead, beyond resurrection. Generally, a well-cared-for battery will last five years, losing about 20% capacity per year.
2. Your battery will continue to discharge slowly, even if it is turned off.
Why? It's related to the chemical reactions happening inside the battery. However, the most likely reason is that there is special circuit in your device which monitors the battery voltage. Why do you need such a circuit? Read on.
3. Your battery will be damaged if it is discharged below a certain threshold, or overcharged.
For this reason, most devices have special circuits which measure the voltage of the battery, and turn the device off if the voltage drops too low. As already discussed, if you completely discharge the battery, it will continue to discharge even when it is turned off. This means the battery may in fact discharge to a dangerously low level, where it will become irreparably damaged. It will drastically reduce the life of your battery. Fortunately, the same circuit protects against overcharging, so you will probably never have to worry about that.
The moral of the story. Don't deliberately try to completely discharge a battery. Don't let your device sit around with a flat battery for days on end. Don't buy a spare until you need it.
Monday, July 06, 2009
Python + Wiimote + 30 tonnes of Steel
We're almost done with our Giant Robot Project. Realising we had only a few hours before the robots would be deconstructed and sent away, we decided... that we must add Wiimote control to our system! Yes, 15 tonne steel arms, giant claws and 200 bar of hydraulic pressure... all controlled with a flick of the wrist.
With loads of help from my partner in crime, Dan Adams and the Python cwiid module we were up and running in about 2 hours. We used tilt left and right to move the slew, and lean back and forward to control the main boom and the two smaller jibs.
Huge thanks to Transmin for letting us use their robots! I'm willing to bet that these robots are the largest Wiimote controlled devices on the planet.
Anyone care to dispute? :-)
With loads of help from my partner in crime, Dan Adams and the Python cwiid module we were up and running in about 2 hours. We used tilt left and right to move the slew, and lean back and forward to control the main boom and the two smaller jibs.
Huge thanks to Transmin for letting us use their robots! I'm willing to bet that these robots are the largest Wiimote controlled devices on the planet.
Anyone care to dispute? :-)
Subscribe to:
Posts (Atom)
Popular Posts
-
I've just seen and used a brilliant ssh option. The command: sudo ssh -D localport user@externalhost will set up a local SOCKS proxy l...
-
Working with multiple threads is often a necessary evil. This is how I do it safely inside a Unity3D component. There are only certain time...
-
Update: This is another planet shader, with more physical fidelity. Shader "Planet" { Properties { _MainTex ("Di...
-
When you start working with threads in your Unity3D project, you will discover that many things need to be done in the main loop. For exampl...
-
Space is awesome. Especially when it is generated using Perlin noise, and some cool shaders. You can try it out over here.
-
Possibly slightly more correct lighting. The rim light is now only applied in the direction of the sun, rather than being purely based on v...
-
So, you've created a car prefab using WheelCollider components, and now you can apply a motorTorque to make the whole thing move along. ...
-
It is not an official port, but a very good replica. This is one of my favorite games, and I don't have many. It's deep, difficult, ...
-
Summary: NodeJS wins. Test Program ab -n 10000 -c 5 http://localhost/ Gevent Code from gevent import wsgi class WebServer(object): ...
-
Thank to Adrian Boeing I was inspired this morning to hack together a ripple shader for Unity3D. Thanks for the math Adrian. You can see t...