The Serial Port.

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
sail4sea
Posts: 11
Joined: Sat Mar 05, 2011 11:33 pm

The Serial Port.

Post by sail4sea »

I am going to build a tweeting doorbell with my wl-520gu. I am going to hook up a webcam, write a python twitter client, and hopefully send a picture to twitpic every time my door bell is rung. I thought I would use a serial port to tell the wl-520gu that the door bell was rung. Since the doorbell is essentially a momentary switch, can I just short the RX and the GND pins while the doorbell button is pressed and listen for that event in pyserial? I am not really sure how to work with the serial port besides using it to get a console.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: The Serial Port.

Post by mightyohm »

I don't think so. You need a microcontroller to turn the button press into a serial character.

Maybe there is a way you could use a USB mouse instead?
sail4sea
Posts: 11
Joined: Sat Mar 05, 2011 11:33 pm

Re: The Serial Port.

Post by sail4sea »

Thanks for reply. I think I would rather use a microcontroller than a usb mouse. Could you please point me in the right direction?
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: The Serial Port.

Post by mightyohm »

Have you seen this? I used a microcontroller to control the LCD display and read the tuning knob. You could modify my design to use a pushbutton instead (and get rid of the LCD if you don't need it).
sail4sea
Posts: 11
Joined: Sat Mar 05, 2011 11:33 pm

Re: The Serial Port.

Post by sail4sea »

I did see that. I wanted to try to avoid making that big of circuit, but after reviewing it and the code, it seems like the way to go. Most of the lines on the left side are power and control for the uC, I assume. Instead of the potentiometer, I assume I apply a signal of 5 v to the PC4 line of the uU and then pull that down when the bell is rung.

Thanks.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: The Serial Port.

Post by mightyohm »

My circuit could be adapted to different AVR microcontrollers too, there is no reason you need to use an ATmega168, you could probably use pretty much any AVR with a serial port. The code contains a lot of stuff you don't need so you can strip a lot of it out.

You could also do this with a PIC, or an MSP430, or...
Post Reply