Page 1 of 1
The Serial Port.
Posted: Sat Mar 05, 2011 11:49 pm
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.
Re: The Serial Port.
Posted: Sat Mar 05, 2011 11:56 pm
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?
Re: The Serial Port.
Posted: Sun Mar 06, 2011 4:05 am
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?
Re: The Serial Port.
Posted: Sun Mar 06, 2011 11:10 am
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).
Re: The Serial Port.
Posted: Sun Mar 06, 2011 1:05 pm
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.
Re: The Serial Port.
Posted: Mon Mar 07, 2011 11:11 am
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...