background preloader

Arduino Tutorial - Lesson 5

Arduino Tutorial - Lesson 5
We've done a lot so far, blinking lights, printing messages...all of that stuff is output: signals coming from the Arduino. The next step is to start playing with input, with the Arduino responding to outside events. In this lesson we will begin with the most basic kind of input, a push-button switch! You're probably familiar with switches, there's tons of them in your house. One kind of switch you use every day is a light switch. On the left, the switch is open and no current flows. (thanks wikipedia!) In this photo, you can see the internals of a light switch. Light switches are great but we need something smaller. These little switches are a 1/4" on each side, cost about 25 cents, and can plug directly into a breadboard. Normally, the two wires are disconnected (normally open) but when you press the little button on top, they are mechanically connected. Find 5 things around the house that have switches. Power up the Arduino and try pressing the button. Switch capability Fig 5.2 Fig 5.4 Related:  arduino stuff

DIY Projects, Inspiration, How-tos, Hacks, Mods & More @ - Tweak Technology to Your Will The format of this book is very different from the regular O'Reilly books. It is written by a geek for geeks. So it doesn't start with a smooth introduction about the basics. It seems to have a rocky start since a lot of assumptions is made about the reader. The diagrams also seem to be hand-drawn on napkins. Chapters 1 and 2 contain a bit of what the author self-admittedly confession to be "fluff". Chapter 4 really rocks. Overall the book is excellent for getting started with Arduino. Arduino Tutorial: An Introductory Guide Update! Don’t miss our famous article:Â Top 40 Arduino Projects of the Web. Previously we introduced you to the Arduino and it’s awe-inspiring incredibleness. Arduino Tutorials: As usual, Instructables has plenty of tutorials also.If you’ve ever thought, “Can the arduino do…?” The Arduino uses the ATmega168.

Proto Shield for Arduino This is a design for an open-source prototyping shield for Arduino NG/Diecimila. It has tons of cool features, to make prototyping on your Arduino easy. Compatible with NG, Diecimila, Duemilanove and any Arduino-clone in the 'classic' shape and pinout.Reset button up topICSP headerLots of GND and +5V rails.DIP prototyping area makes it easy to add more chips.SOIC prototyping area above USB jack for up to 14-pin SOIC chip, narrow medium or wide package.Use 'mini' or 'medium' breadboard.Two 3mm LEDs with matching resistors.Extra 6mm button Ideas for use Larger breadboard for tons of working space! Tiny breadboard fits nicely on top. 2 LEDs and one button are availble for general purpose use!

Lab3 - Laboratory for Experimental Computer Science Watchdog and Sleep functions This example shows how to make use of the Watchdog and Sleep functions provided by the ATMEGA 168 chip . These functions are useful if you want to build low power consuming devices operated by battery or solar power. The reduced power consumption is achieved by through a intermittent operation of the system .In case of Arduino your main loop will be executed once before the system is put into the sleep mode. After a few seconds t the watchdog wakes the system up and the main loop is executed again. When we assume that the time to measure a sensor and making some decisions will take 10 millisecond and the watchdog is set to 8 seconds the on/off ratio is 800 which extends the battery live time by this factor. Battery live time calculation Now we want to know long we can operate our device with standard alkaline AA Cells. In normal operation with a current of 20mA the battery will last 2000/20 = 100 hours or about 4 days. Nightingale Example Burn the Bootloader

Introduction to Rack middleware Rack middleware is hot topic these days and anyone who is reading Ruby-related blog sites must have heard about it already. However, if you didn’t, here’s short quote from Rack site: Rack provides an minimal interface between webservers supporting Ruby and Ruby frameworks. During last couple of years, Rack has became de facto standard in Ruby web development world, providing unified and and simple interface for frameworks creators. Brief history CGI was first widely used method of running Ruby scripts on server-side. Middleware Rack is more than interface that can be used to talk to web server. If you are using Ruby on Rails, it is usually used as top-level module. What is really interesting is Rack’s simple architecture. Installation $ gem install rack `</pre> First steps Now that we have Rack installed, we want to try how it works. Rack use configuration file with extension .ru, that instructs Rack::Builder what middleware should it use and in which order. $ rackup More reading

Cheap Arduino Wireless Communications I was looking for a way to handle wireless communications between two Arduino boards. Other options like Xbee or Bluetooth were going to cost $50 to over $100. Then I found a cheap RF transmitter and receiver at Sparkfun. Here are a few limitations to RF solution: Communications is only one way. The advantages are that it is cheap and it is pretty easy to use. Below are some images showing how I hooked up the receiver and transmitter to two different Arduino boards. Here’s a picture of the my actual bread boarded circuit. Since the receiver is constantly picking up random noise I add a few extra bytes to every data packet. I broke the Arduino code into two files. I did all of my initial testing without any of these improvement and everything worked fine with these devices inside the same room. Add an antenna. I got a lot of help from the transmitter/receiver data sheets, and from this article. I’ll mention an even cheaper idea I had while doing this. Permalink

The World Famous Index of Arduino & Freeduino Knowledge MicroPython pyboard [v1.0] ID: 2390 - $44.95 The pyboard is a compact and powerful electronics development board that runs MicroPython. It connects to your PC over USB, giving you a USB flash drive to save your Python scripts, and a serial Python prompt (a REPL) for instant programming. Works with Windows, Mac and Linux.MicroUSB cable not included, but you can pick one up from the store!MicroPython is a complete re-write of the Python (version 3.4) programming language so that it fits and runs on a microcontroller. It includes many optimisations so that it runs efficiently and uses very little RAM.MicroPython runs bare-metal on the pyboard, and essentially gives you a Python operating system.

Arduino - HomePage