Picture of Arduino XMAS hitcounter
Christmas is coming closer, so here is my contribution to put you in the right mood. It is a blog hitcounter, that rings a bell. Literally. It puts a smile on your face, every time someone hits your blog.

It consists of an Arduino board, a bell, a servo and a couple of lines of code in c, python and php. Most parts are fairly common and should be easy to get.

Step 1: Tools and Materials

Picture of Tools and Materials
So what is needed?

  • Arduino Board. I got an Arduino Diecimila from Adafruits. In the meantime there are really cheap and handy clones out there, e.g. the really bare bone board from Modern Devices, especially if you want to use them on a breadboard.
  • A servo motor. Any servo will do. I took an old one that was used in my former hobby.
  • A bell. Preferably one that is small enough to shake it with the servo.
  • Two paperclips. A large one to hold the bell and a small one to build the actuator to ring the bell.
  • Wires to connect the servo with the Arduino.
  • A website. In fact it has not to be a website or a blog. Actually everything that can be counted, will work.
  • A PC or a Mac to connect the Arduino board with the blog or website.
You may need an soldering iron, if the wires can not be connected directly to the Arduino.
1-40 of 45Next »
brycepruett998 months ago

The python script crashes when the counter gets to 10. Any solutions?

saymowan11 months ago

Nice project! :---)

tli42 years ago
Can you change the code so that an LED Blinks when it gets a hit? Thanks. Please reply soon!
klaurens3 years ago
If I wanted to connect a Normal DC Motor to the Arduino which only has two connector pins, how would i do it??
I wouldn't recommend doing this. There are motor controllers for the Arduino that can handle the current requirements of DC motors.
Where is the code that needs to be put into the computer program?
alex_weber (author)  etylerawesome3 years ago
Take a look at step 5.
klaurens3 years ago
If I wanted to connect a Normal DC Motor to the Arduino which only has two connector pins, how would i do it??
alex_weber (author)  klaurens3 years ago
You can't because the motor needs too much current. You have to use an H-bridge or a motor shield from adafruit or something like that.
If I wanted to use a Piezo and an LED would the coding be much different??
alex_weber (author)  klaurens3 years ago
Piezo and LED can be driven directly from the Arduino. Maybe look for an Arduino tutorial to learn how to deal with LEDs and Piezos.
SimonUK3 years ago
This is such a great idea, and inspired my own interpretation, which is standalone - no computer required. Have a look here:

PaulCote3 years ago
Ring the bell every time someone tweets "Merry Christmas"? Not sure how, though.
Buzzsushi4 years ago
Will it work with twitter?
Did you manage to implement this with twitter? and if so would you be willing to share the code?

Thank you
alex_weber (author)  Buzzsushi4 years ago
What do you mean, ring the bell when someone replied to you on twitter?
Yes, that should be no problem.
aeboi804 years ago
I was looking for the bell and found a bunch of places at google shop - http://bit.ly/aCeJtS
moogbeatz994 years ago
how would i set up this hit counter thing with a google site? would it work at all? im not planning on actually doing this instructable, i might when i get spare time and money, but i would like to actually know if it would work.....
 i'd like to implement this with blogger (http://ilictronix.com), but blogger doesn't support php :(  is there a way I could write to a file with javascript?

hearing this every 15 seconds might get annoying :P
ReCreate6 years ago
So what does the python script do when it sees someone visited your site?
alex_weber (author)  ReCreate6 years ago
It fetches a small text file from my site. This text file carries the number of hits. If the number of hits is higher than last time, then trigger the bell.
XD Yes i know that part how does it trigger the bell?
alex_weber (author)  ReCreate6 years ago
It sends a signal via serial port to the Arduino. Do you mean that?
What signal(you are not being descriptive...)
alex_weber (author)  ReCreate6 years ago
Take a look at the python snippet:
while (True):
_ counter = urllib.urlopen(myUrl).read()
_ delta = int(counter) - int(last_counter)
_ print "counter: %s, delta: %s" % (counter, delta)
_ ser.write(chr(ord(chr(delta))))
_ last_counter = counter
_ time.sleep(10)

It computes the delta between the last counter value and the current counter value. Say, the old value was 112, now it is 115. Next the delta, 3 is send as byte over the serial port to the Arduino. The Arduino reads the byte and rings the bell three times.
Ah that makes more sense now.
Maker Shed6 years ago
Wow nice Project!
akatsuki6666 years ago
and that thing with the loop (thats a reoccuring problem in alot of skeches)
akatsuki6666 years ago
my arduino barly takes any codes wthout saying error -.- and this one seems to say that... in function ' void loop () ' : error: ' refresh ' is not a member of ' servo '
alex_weber (author)  akatsuki6666 years ago
Hi Akatsuki666, try deleting the line with refresh. If you are using the latest version of the ArduinoIDE, the method "refresh" is no longer available. Cheers, Alex
akatsuki6666 years ago
luke6 years ago
hahah i love it , 5* and faved!

i have to ask , i didnt see it in your description. but what is your your macbook playing ?? it sounds like you have got the termnal to sing! useing the saay command???
alex_weber (author)  luke6 years ago
accobra866 years ago
www.youtube.comGood work. my son (says proud father) made similar use of the RC servos in a Golf Robot RC. Can be found on youtube.com under this name... http://www.youtube.com/results?search_query=golfrobot+sigtuna&search_type=&aq=f
Kryptonite6 years ago
Is it possible to hook it up to anything else? say... when some body talks to u on msn and ur in the next room, cud u hook that up? or instructables comments? Just idea, but this wud be soooo neat to try out for them.
alex_weber (author)  Kryptonite6 years ago
Hi Kryptonite, yes, that would be possible. You would have to modify the python script to fetch an RSS feed for example. Most messaging systems or comments are availble as RSS feed. If a new message or comment is available in the feed, the python script will receive it and notify the Arduino/bell. For the comment feed on instructables, go to your profile and enable your private feed. Cheers, Alex
Sweet. thanks for the quick reply. I'm seriously thinking about making this now, cuz I play this game, and I can't tell if somebody want to talk to me I don't know. Then an hour later I go see, and the person has logged off. thanks, Kryptonite.
iman7 years ago
wow this is sweet I saw this a while back but I ignored it because I didn't have an arduino but now that I got one this will be my first project :) Thanks!
cr0ybot7 years ago
Added to Arduino Group! ;D
LinuxH4x0r7 years ago
Nice job! Looks like it would get annoying after a while...
1-40 of 45Next »