import os indir = ‘c:\\datafilepath\\’ for filename in os.listdir(indir): if filename.startswith(“xyz_”): newname = filename.replace(“xyz_”,”abc_”) try: os.rename(indir + filename, indir + newname) print “[NEW]”, filename, “–>”, newname except: print “[OLD]”, filename, “–>”, newname
examples
My RPi is the brain of my ARK-AV-01 robot. As I currently am in the programming phase, I found myself programming it from the command line. I wanted something easier, with no login/password, so I activated samba with the following samba.conf file: [global] workgroup = mygroup interfaces = wlan bind interfaces only = yes server […]
I had a productive couple of days. Arkadian AV-1 is now operational as a remote control vehicle. Arduino I’m using the StandardFirmata library on the Arduino Mega 2560, with no modifications whatsoever. It was by far the easiest way to get RaspberryPi to control the 4 motors, receive feedback from the 4 sensors (on order […]
Today I have quite a bit of work to do on this project. By the end of the day, I should have a fully functional remote control vehicle. Earlier this morning, I finished the joystick. I will be using a Nexus 7 with touchOSC as my joystick and I put together the following layout: Rotating […]
Today I worked on a few necessary but rather boring parts of the construction. I got the Sparkfun compass module from Proto-Pic and spent a few hours setting it up and calibrating it. I used the HMC5883L Arduino library example to generate the following: 1 2 3 4 5 6 7 8 9 10 11 […]
This is a post that I will edit from time to time, adding more links as I find them. 1. This company has free and commercial icons: dryicons.com. I like the iconika icons (available in red, blue, green, grey – here is a sample in blue: http://dryicons.com/icon/iconika-blue-icons). One thing I really appreciated from this site, […]