Skip to main content

fun with the nrf24l01+

What I am trying to do nowadays is to get the "open sesame" system to work wireless.

The servo that opens the door is currently connected directly to the Raspberry Pi, which limits the use of the Raspberry Pi for just this purpose, and I was starting to want to have it around for more things.

The NRF24l01+ is a neat, cheap little device I found in the internet that gives devices a means to communicate with each other wireless through a 2.4 GHz network.

I've been looking at this site for a good sample to follow and build upon.

Currently, I have not been able to build the Raspberry Pi source given from that site on my own, but someone in the comments managed to upload a working, built binary for it, which I have been using so far for testing. I'll eventually have to be able to build it on my own, as I'll probably have to change the code for my purposes.

I've been playing around with it, and I've been able to make lights blink. However, everything seems to malfunction when I try to wire the servo. I haven't actually wired the servo used for the testing on its own, so I have to first rule out that it's a servo/power issue that's causing it.

For now, blinking lights:


Comments

Popular posts from this blog

json messaging (2/2)

Took a good 2 hours to change all the messages into JSON format and make it work. But it is done. All is JSON. Using it like a map, currently with three key-value pairs: "id" : for entering a session ID of another session if needed. Currently used for the web client to receive a acknowledge response to confirm that the target received the message (mainly for testing purposes). "type" : probably the most functional data going through all this. Current types are STARTUP_TYPE - for when the target sends its initial message, the server uses this to mark which session is the target. REQUEST_TYPE - for when the web client sends a request to the target. Server uses this to send request to target. ACK_TYPE - for when the target finishes carrying out the requests and sends an acknowledgement of the completion of the request to the server. Server uses this to send confirmation to the web client  MISC_MSG_TYPE - for anything else. DEBUG_TYPE - current...

come back

The last couple of weeks have been quite refreshing. The drive for learning and trying out new things has never been higher. Currently fascinated with Node.js; Javascript truly isn't the make-a-website-pretty script I had known anymore.  Playing around with back-end and front-end frameworks. Currently playing around with Sails.js, and once I get used to that, I am looking forward to trying out Angular.JS as a front-end framework. Other than that, currently have couple of other random APIs (non-Node.js) I would like to play around with, but I'm just keeping them up in my browser tabs to that I'll get to them eventually. In addition, I reviewed the Android Developer tutorial again--hoping to try making something in that end as well.

adding a servo

Since I don't have any lock that works based on a digital signal, it seemed appropriate to at least have something in place that would emulate the behavior of such a lock, and I thought that a servo would be a good substitute. (note: a servo is a device with which one can control a specific rotational position) Connecting a servo to the current circuit isn't too much of a challenge, as it just requires a single output connection along with the ground/power. Making the servo also just requires an addition of a few lines of code, using the Servo library . A simple video of the servo in action: Now, at least with a locking behavior in place, the one visible functionality that needs to be addressed is the device's ability to distinguish between a "standby" state (no alcohol/no breathing in: should be in "lock" mode) and a "open" state (no alcohol/breathing in: should be in "open" mode).