Skip to main content

more for self notes than anything

I moved into a new apartment on August, and so far, it's been great.

One of the things that I noticed when I got the keys to the apartment was that the front-door key was labeled "do not duplicate."


I normally copied a set of keys just in case I lose them, so I checked the internet to see if the "do not duplicate" denoted a physical difficulty or a moral request. The results pointed towards the former. Search results pointed out that these keys required a special "owner card," and locksmiths needed a special copying device for these specific locks. Inconvenient.

Meanwhile, I was humoring the thought of getting my hands on a Raspberry Pi, but I couldn't really think of a reason to justify the purchase.

Well, the two thoughts crossed ways, and the conclusion of "I should program something to open my front door" was made.

How?

There's an intercom system in the apartment, and I supposed that having something press the door open button would be something.

And the click on the check out button was made.

That was about 2 weeks ago.The Raspberry Pi is now here, and I have already started messing around with it. 

After working on it a bit, doing research on implementation and "learning" Python whenever it is needed, I thought that recording my progress would be a good and organized way to look back on it.

This is that record, and I'll try to write as much information as I can.

Couple of posts would be a recap of my progress to date, and future posts will be more of an update.

Comments

Popular posts from this blog

GPIO testing

Since the environment of the client-server-target is currently quite functional in the messaging standpoint, I decided to try connecting a simple LED light to the Raspberry Pi to see if it could "open" a door when the command is received. Installed the RPi.GPIO module (a Python module that gives the user command of the GPIO--General-Purpose Input/Output--ports in the Raspberry Pi) and connected the LED light to a GPIO pin. When the target received a request message, it would signal the GPIO pin to drive a current to the LED to light it up for 2 seconds. in main: if __name__ == "__main__":   GPIO.setmode(GPIO.BCM)   GPIO.setup(17, GPIO.OUT) in the on_message's request-received logic:      GPIO.output(17, True)      time.sleep(2)      GPIO.output(17, False) The video is a weak visual result. You can a click when the LED lights up; that was the sound of the key being pressed that sent the request message. Now, tim...

setting up pwm

There's always an obstacle.. I implemented the pwm module as described in the link in the previous post, but oddly enough, it didn't work. The error I received: AttributeError: 'module' object has no attribute 'PWM' After some time scratching my head, I came to the realization that somehow my python was running an older version of the RPi.GPIO library, as PWM control was a pretty recent addition to the library.  And indeed it was.  Not really sure what's happening in detail, but it seems that there are two different... entities? that manage libraries for Python. One is through the usual "apt-get" command and the other is "pip." It appears that Python looks at "pip" first, and it currently linked RPi.GPIO to a really old version of the library.  Uninstalling that older version ("pip uninstall RPi.GPIO") and using the version I obtained through apt-get ("apt-get install python-rpi.gpio...

playing with servos

some servos that I had ordered were delivered. the instructions suggested another brand/model of servos, but these were a much more economical (cheap).  I tried adding them to the hand: I'll have to print the "pulley" pieces that will be attached to the servos. meanwhile, I did somewhat (hackily) got the wrist to work, for now: you keep hearing the "usb plugged out" sound in the background, and that's because the servo was being powered by the arduino. the servo's power draw appears to be causing a shutdown of the device. will need a better power source for the servos. it feels like these pieces that are supposed to be plugged into the servo will have size issues.