arduino

How to start programming microcontroller?

I have developped software in C++, Java, PHP, .Net and now I am interesting to learn to program material thing. I would like to program system that could interact with IR, LCD and to be able to resuse old printer motor to use it, etc. My problem is where to start? I have searched the web and have found an open source board called Arduin...

Getting Arduino LilyPad to switch BlueSmirf v2.11 to/from command mode

A battery powered (2 x AA) Arduino LilyPad should switch a BlueSmirf v2.11 Bluetooth modem to/from command mode (see source code below). The BlueSmirf has been set to 9600 baud. If the PC connects via Bluetooth (see source code below), the Arduino program runs fine at the beginning (sending multiple "ping\n"). After some time it (LilyPa...

Need help improving a Ruby DSL for controlling an Arduino controlled drink dispenser (bar monkey)

I'm writing a DSL in Ruby to control an Arduino project I'm working on; Bardino. It's a bar monkey that will be software controlled to serve drinks. The Arduino takes commands via the serial port to tell the Arduino what pumps to turn on and for how long. It currently reads a recipe (see below) and prints it back out. The code for se...

How to communicate with an Arduino over its serial interface in C++ on Linux?

I have an RFID reader connected to an Arduino board. I'd like to connect to it over its serial interface, and whenever the RFID reader omits a signal ( when it has read an (RF)ID ), I'd like to retrieve it in my C++ program. I already have the code for simply printing the RFID to serial from the Arduino. What I don't know, is how to re...

Check if serial port is listening

I have an Arduino sending and receiving instructions with a python script via a serial port. The Arduino takes a button state and when it is pushed it will send a message via serial to a python script and await a response. (via Serial.available()). Works well enough. However if the python script has crashed for whatever reason (ideally...

Weird random data being sent from Arduino to Processing

I'm trying to read data from a photocell resistor and my Arduino Decimila and then graph it in real-time with Processing. Should be painfully simple; but its growing into a little bit of a nightmare for me. code I'm running on my Arduino: int photoPin = 0; void setup() { Serial.begin( 9600 ); } void loop() { int val = int( map( ...

Is the .NET Micro Framework a good way to start with embedded programming?

How does the .NET Micro Framework with a dev board compare to something like an Arduino, or Nintendo DS for starting with embedded programming? ...

Attach variables

Hey everyone, I want to take two variables (in and in2) and put them together, for example: in = 1; in2 = 3; pin = in.in2; // I want this to set pin to 13 The arduino IDE tells me that in is not a class, so what syntax would I use to accomplish this? EDIT: I figured out a different way to do it, you can just take in. multiply it by...

Serial sending weird data

So I'm making a sketch that takes a two digit number from the usb port, checks the state of the pin that matches the number, then toggles the pin on/off. Take a peek at the source For some reason, when I send 13 through the Arduino serial monitor, I get this message back: Pin number is greater than 14, details: 490 51 541 Meaning t...

Arduino C++ code: can you use virtual functions and exceptions?

Following up on this comment from the question Writing firmware: assembly or high level?: When compiling C++ code for the Arduino platform, can you use virtual functions, exceptions,etc. Or would you want to (have to) use a subset of C++ (as described in the comment) Any other caveats when programming for the Arduino platform? ...

Getting Epson receipt printer to print from Arduino

This is a bit of an odd/specific question, but I'm having no luck, so maybe someone can help. I'm trying to build a microprinter using an Arduino and an Epson TM-T88II receipt/POS printer. The printer uses the ESC/POS system, but I can't get it to do anything at all from the Arduino. I'm doing things like: #include <SoftwareSerial.h> #...

pir sensors + arduino + python + email alerts

hello we are working on a project for school, we have 2 pir motion sensors running off an arduino micro controller, we able to view the output of the serial port in both ardunio IDE and python IDLE what we want to do next is after about 30 seconds of motion being detected, send out an email alert, being that we don't have ethernet capa...

Lighting Control with the Arduino

I'd like to start out with the Arduino to make something that will (preferably) dim my room lights and turn on some recessed lighting for my computer when a button or switch is activated. First of all, is this even possible with the Arduino? Secondly, how would I switch on and off real lights with it? Some sort of relay, maybe? Doe...

Fade in multiple LEDs with Arduino

I need to figure out how to fade in and out of multiple LEDS in a function with an Arduino. Can't use delay() because other things need to run while the light is fading. This is what it has so far, but does not work. int value = 0; // variable to keep the actual value int ledpin = 9; ...

How can I unit test Arduino code?

I'd like to be able to unit test my Arduino code. Ideally I would be able to run any tests without having to upload the code to the Arduino. Are there any tools or libraries out there which can help me with this? Update: There is an Arduino emulator in development which could be useful but it doesn't yet seem to be ready for use. Updat...

asp.net web page to device connect to server's usb (COM) port

Hello All, I am working on a way to send commands to an Arduino board from a web site. The Arduino board is connected to the computer via a USB port (a COM port) I have managed to connect and control the board using a VB.net program. I also wrote a vb.net class that can instantiate a COM connection and send and receive messages. My ne...

How to send sound to a speaker

Hi, If I were to program a microcontroller (ATMega128) to play a realtone with a speaker, how would I do this? Do I need to use a digital/analog converter to send different amplitude values, or is it enough with frecuency changes? In any case, how would I encode the frecuency/amplitude values that the speaker needs to receive? Do I need ...

escape character via serial

Hi, I'm controlling a serial printer from arduino, now it works perfect but i need to send it escape characters to controll some especific features of the printer. Anybody can show me a way to do that? i need to send "ESC i" thx ...

Arduino serial reading

I am working on a web controlled rover and am using a serial port to communicate with an Arduino. I wrote some PHP that just uses fwrite() and writes an ascii 1 or an ascii 2 to the serial port. The arduino is listening to that port and does stuff based on what it hears. I know my PHP is working, because whenever I tell it to send stuff,...

How can I get an assembly language listing of my Arduino Sketches on Windows?

I would like to be able to see an assembly language listing of my Arduino sketches. How can I achieve this? Update: I am running the Arduino Software on a Windows machine. ...