Tag Archives: serial

Clap detector circuit / AirSpell typing system

This circuit combines a simple audio amplifier (based on an LM358 opamp) with an Arduino Nano to facilitate the detection of clapping sounds or blowing on the microphone. This is my breadboard circuit: I actually used a loudspeaker for my … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

AirMouse – control mouse pointer in Linux using one switch or by blowing on microphone

Article under construction! To install xdotool: Bash script (save as “airmouse” and “chmod 755 airmouse” to make it executable): Arduino code:

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Writing bytes to a serial port in C

This is a (relatively) simple example of a C program to send five bytes to a serial port in Windows. In this case, I’m sending the five characters “hello” via COM22 at 38400 baud, but of course the program can … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , | 43 Comments

Simple command line trick for sending characters to a serial port in Windows

I often need to send short character strings to a serial port in Windows. The sort of thing I might use this for is sending a command to a robot or other microcontroller-based device that I’m building using a USB-to-serial … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , | 72 Comments

Working dsPIC30f4011 code to control servo angle from PC via serial

Here’s a working example of servo angle control from the PC, via serial communication to the dsPIC30F4011. The servo angle is set using a 5 character long command: The first character is ‘s’. The remaining four characters, which must all … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , , , | 2 Comments

Analog-to-PWM Conversion with the PIC18f4620

The main function below is reproduced with the kind permission of Robert Byrne who is using it in an Instrumentation project. His program is an adaptation of my PIC18F4620 template code that I posted recently, so to form a complete … Continue reading

Posted in PIC | Tagged , , , , , , , , , , | Leave a comment

Template Code for the PIC18F4620

I’m writing a new template program for the PIC18F4620, for use in our RoboSumo module and other projects. The template program basically sets up a few frequently used features – e.g. digital inputs, digital outputs, analog inputs, serial communication, PWM … Continue reading

Posted in PIC | Tagged , , , , , , , , , | 4 Comments