background preloader


ALPS STEC12E07 Encoder A rotary or "shaft" encoder is an angular measuring device. It is used to precisely measure rotation of motors or to create wheel controllers (knobs) that can turn infinitely (with no end stop like a potentiometer has). Some of them are also equipped with a pushbutton when you press on the axis (like the ones used for navigation on many music controllers). They come in all kinds of resolutions, from maybe 16 to at least 1024 steps per revolution, and cost from 2 to maybe 200 EUR. I've written a little sketch to read a rotary controller and send its readout via RS232. It simply updates a counter (encoder0Pos) every time the encoder turns by one step, and sends it via serial to the PC. This works fine with an ALPS STEC12E08 encoder which has 24 steps per turn. I learned about how to read the encoder from the file encoder.h included in the Arduino distribution as part of the AVRLib. Example 1 Oh, a few notes: Interrupt Example Below is some code that uses an interrupt.

Related:  ArduinoIntervallometreArduinoolindgallet

Think Labyrinth: Maze Algorithms Maze Classification Mazes in general (and hence algorithms to create Mazes) can be organized along seven different classifications. These are: Dimension, Hyperdimension, Topology, Tessellation, Routing, Texture, and Focus. A Maze can take one item from each of the classes in any combination. Tutorial: manage menu and LCD display with Arduino Working on my MIDI ribbon controller I needed to implement a menu to easily configure several parameters, but I found information on how to handle a menu, how to manage an LCD display, but very poor info on how to combine the two things. However, thanks to Alexander Brevig Menubackend library I managed to create the menu I wanted.I downloaded the Alexander Brevig Library version 1.4 and I slightly modified it adding, at line 195 of the MenuBackend.h file , immediately before the line "private:", this method: void toRoot() { setCurrent( &getRoot() ); }

Schematic for Arduino Sensor Shield v5.0 ? - Arduino Forum - Aurora It's very unfortunate that the term "Arduino" is used both for a specific company name and also for generic module compatibility from any manufacturer. Arduino is a trademark that many folk in various countries are only too happy to violate. Consider how easy it is to violate said trademark, BTW. Unlike Digilent and other companies products' you don't even need to reverse-engineer the schematics, code, etc. because it's all published for the world to use. Most of the wares sold for less than $20 that claim to be Arduinos are in fact knockoffs whose sellers are predominantly based in the far east. That's not to say that they don't produce quality wares, etc. but with those prices it's unlikely that they're contributing to the Arduino open source efforts the way that the official Arduino suppliers/resellers do.

How to Build a Rotary Encoder Circuit with an Arduino In this project, we are going to build a circuit which uses a rotary encoder. A rotary encoder is a device which allows us to know whether a knob is being turned clockwise or counterwise (which is one way or the other). It can know when a user is turning the knob one way versus turning the knob the other way. Therefore, based on which way the user turns the knob, we can know this and perform any circuit action based on the directional change. In this circuit, we will control demonstrate the use of a rotary encoder and show how it detects clockwise rotation versus counterclockwise rotation.

Use Arduino with TIP120 transistor to control motors and high power devices - All Hello again. So you have a DC motor or lamp but no matter how you connect them to your Arduino they just won't work? Guess what, the Arduino is a brain that comes with small muscles. It can control LEDs and other low power nicknacks but not those power motors or lights you need for your next project. The Arduino is good at thinking but not for heavy lifting. Lazy lad. PortManipulation - Aurora Reference Language | Libraries | Comparison | Changes Port registers allow for lower-level and faster manipulation of the i/o pins of the microcontroller on an Arduino board. The chips used on the Arduino board (the ATmega8 and ATmega168) have three ports:

Classic Joystick to USB Adaptor - 3 The following Arduino Sketch file should be compiled and uploaded into the Arduino Leonardo or Arduino Micro: JoystickToKeyboard.ino // ColecoVision / ADAM Joystick to PC Keyboard Converter// for the Arduino Leonardo // 2014-08-24 //----------------------------------------------------------------------------- // Joystick Pins const byte gcFirePin = 2; const byte gcUpPin = 3; const byte gcDownPin = 4; const byte gcLeftPin = 5; const byte gcRightPin = 6; const byte gcModeAPin = 7; const byte gcModeBPin = 8; const byte gcFireMonitorPin = 13; const byte gcBit0Pin = 3; const byte gcBit2Pin = 4; const byte gcBit3Pin = 5; const byte gcBit1Pin = 6; // Current Frame Joystick Status byte gLeftFireButton = 0; byte gRightFireButton = 0; byte gUp = 0; byte gDown = 0; byte gLeft = 0; byte gRight = 0; char gNumPadValue = ' '; byte gPurpleButton = 0; byte gBlueButton = 0; byte gBit0 = 0; byte gBit1 = 0; byte gBit2 = 0; byte gBit3 = 0; digitalWrite(gcFireMonitorPin, gLeftFireButton | gRightFireButton); }

How to Use IR LED and Photodiode with Arduino In this post I am going to show you how to use and program IR LED and Photodiode pair with Arduino to detect obstacles in a short range. Before going to do the project let us have a brief look at the IR LED and Photodiode. Photodiode is a light sensitive semi-conductor diode which converts the light energy into voltage or current based on the mode of operation.

StepperBipolarCircuit - Aurora Reference Language | Libraries | Comparison | Changes Two Pins Four Pins Reference Home Bipolar Transistor HBridge Motor Driver The classic beginner’s DC motor driver circuit that appears in every electronics textbook is the bipolar transistor H-bridge. An H-bridge is an arrangement of transistors that allows a circuit full control over a standard electric DC motor. That is, an H-bridge allows a microcontroller, logic chip, or remote control to electronically command the motor to go forward, reverse, brake, and coast. For the purposes of this article, I’m focusing on a basic H-bridge that is a good choice for most robots (including BEAM robots) and portable gadgets. This H-bridge can operate from a power source as low as two nearly-exhausted 'AAA' batteries (2.2V) all the way up to a fresh 9V battery (9.6V). In later pages, I'll compare the performance of three different part numbers of popular transistors (2N3904/2N3906 vs 2N2222A/2N2907A vs Zetex ZTX1049A/ZTX968) using a common robot motor from Solarbotics.

Setting up an Arduino on a breadboard Overview This tutorial shows you how to build an Arduino compatible breadboard with an Atmel Atmega8/168/328 AVR microcontroller and FTDI FT232 breakout board from SparkFun. You could also use the Arduino USB Mini. Originally created David A. MellisUpdated from the ITP version by Carlyn MawUpdated October 23, 2008 by Rory Nugent Parts BUILD YOUR OWN H- BRIDGE CIRCUIT USING NPN TRANSISTOR - 2 In this diagram you can see that q1,q2,q3,q4 transistors. when P1.0 is high then the Transistor q1 and q2 on . the q2 and q3 transistor remain in off state because the P1.6 is low. then the current flow direction positive to q1 transistor and flow through motor on end and gets out motor other end and flow through q4 transistor then grounded. so the motor rotate in one direction. When P1.6 is high and P1.0 low then the transistors q2 and q3 on then the current flow through the q2 and q3 so the current flow opposite to previous one so the motor rotate opposite direction. if you want to use the code used in this video for msp430 then it is in bellow: Here is the program for this project. i use energia softwareto program msp430 launchpad

How to make your own Arduino board - 13 If your are like me which I am guessing you are, then ever since you got into doing stuff with arduino you have wanted to make your own arduino board. You may be surprised to find out that making the prototyping board is actually very easy, and can have several advantages over using the commercially sold board. For one thing, All the components together cost a little over 15 US dollars as opposed to the $30 that the Uno board sells for. second, you may not actually want a board, but may simply want the atmega chip as the heart of the project, like if you are making a synthesizer or even a robot. In that case, you can just attach the hardware necessary to use the chip, and solder to the pins you need to use without needing the board.

Transistors Favorited Favorite 33 One of the most fundamental applications of a transistor is using it to control the flow of power to another part of the circuit – using it as an electric switch. Driving it in either cutoff or saturation mode, the transistor can create the binary on/off effect of a switch.