Tuesday, February 24, 2015

Arduino Projects for Amateur Radio

BOOST YOUR HAM RADIO'S CAPABILITIES USING LOW-COST ARDUINO MICROCONTROLLER BOARDS!

Arduino Projects for Amateur Radio

Do you want to increase the functionality and value of your ham radio without spending a lot of money? This book will show you how! Arduino Projects for Amateur Radio is filled with step-by-step microcontroller projects you can accomplish on your own--no programming experience necessary.

After getting you set up on an Arduino board, veteran ham radio operators Jack Purdum (W8TEE) and Dennis Kidder (W6DQ) start with a simple LCD display and move up to projects that can add hundreds of dollars' worth of upgrades to existing equipment. This practical guide provides detailed instructions, helpful diagrams, lists of low-cost parts and suppliers, and hardware and software tips that make building your own equipment even more enjoyable. Downloadable code for all of the projects in the book is also available.

Do-it-yourself projects include:
  • LCD shield
  • Station timer
  • General purpose panel meter
  • Dummy load and watt meter
  • CW automatic keyer
  • Morse code decoder
  • PS2 keyboard CW encoder
  • Universal relay shield
  • Flexible sequencer
  • Rotator controller
  • Directional watt and SWR meter
  • Simple frequency counter
  • DDS VFO
  • Portable solar power source

Tuesday, February 17, 2015

Intel Galileo and Intel Galileo Gen 2: API Features and Arduino Projects for Linux Programmers

Intel Galileo and Intel Galileo Gen 2: API Features and Arduino Projects for Linux Programmers provides detailed information about Intel® Galileo and Intel® Galileo Gen 2 boards for all software developers interested in Arduino and the Linux platform. The book covers the new Arduino APIs and is an introduction for developers on natively using Linux.

Author Manoel Carlos Ramon is a member of the Intel Galileo development team; in this book he draws on his practical experience in working on the Galileo project as he shares the team’s findings, problems, fixes, workarounds, and techniques with the open source community. His areas of expertise are wide-ranging, including Linux-embedded kernel and device drivers, C/C++, Java, OpenGL, Assembler, Android NDK/SDK/ADK, and 2G/3G/4G modem integration. He has more than 17 years of experience in research and development of mobile devices and embedded circuits. His personal blog about programming is BytesThink (www.bytesthink.com).

What you’ll learn
• How Linux libraries and applications are used and interact with sketches
• How to configure WiFi mPCIe
• How to develop and debug Intel’s Galileo and Intel Galileo Gen 2 sketches using the Arduino IDE, native Linux applications, and hacking
• Integration of OpenCV and V4L2 in C/C++/Python to capture picture and videos, and to detect faces, eyes, and your emotional state with a Fisherfaces model
• How to exchange data using the 7160 LTE modem
• How to tweet with REST API 1.1 and OAuth authentication
• How to control a 6 DOF robot arm using a gripper based in coffee grains, as well as how to create a special API and hardware for six analogic controls
• Home Automation with node.js
• How to manage temperature sensors, barometric sensors, and PIR motion sensors, as well as how to create your own soil moisture sensors and keypad
• How to use a Power of Ethernet (PoE) module on Intel Galileo Gen 2

Who this book is for
Software and hardware developers interested in embedded Linux and Arduino.

Table of Contents
Chapter 1: Intel Galileo Intel Galileo Gen 2
Chapter 2: Native Development
Chapter 3: Arduino IDE and the Wiring Language
Chapter 4: New APIs and Hacks
Chapter 5: Networking and Hacks
Chapter 6: Tweeting With REST API 1.1
Chapter 7: Using OpenCV
Chapter 8: Creating a Soil Moisture Sensor
Chapter 9: Home Automation and Dynamic Web
Chapter 10: Power Over Ethernet (PoE)
Chapter 11: Assembling and Controlling a Robotic Arm
Chapter 12: Using an LTE Modem
Appendix A: Intel Galileo I/O and Muxing
Appendix B: Intel Galileo Gen 2 I/O and Muxing
Appendix C: Video Capturing
Appendix D: Picture Grabber

Tuesday, February 10, 2015

Make: Maker Pro

Maker Pro is a book of essays by more than a dozen prominent and up-and-coming professional makers (Maker Pros). Each essay includes advice and stories on topics such as starting a kit-making business, taking a hardware project open-source, and plenty of encouragement to "quit your day job." This book is a reference for anyone who dreams of turning a hobby into a small business, and features stories from well-known professional makers; it will turn aspiration into inspiration.

About the Author

John Baichtal got his start writing blog posts for Wired's legendary GeekDad blog as well as the DIYer's bible MAKE Magazine. From there he branched out into authoring books about toys, tools, robots, and hobby electronics. He is the co-author of The Cult of Lego (No Starch) and author of Hack This: 24 Incredible Hackerspace Projects from the DIY Movement as well as Basic Robot Building With Lego Mindstorms NXT 2.0 (both from Que). Most recently he wrote Make: Lego and Arduino Projects for MAKE, collaborating with Adam Wolf and Matthew Beckler. He lives in Minneapolis, MN, with his wife and 3 children.

Saturday, February 7, 2015

Make: Getting Started with Arduino: The Open Source Electronics Prototyping Platform, 3rd Edition

Make: Getting Started with Arduino: The Open Source Electronics Prototyping Platform


Arduino is the hot open source prototyping platform for artists, hobbyists, students, and anyone who wants to create interactive physical environments. Getting Started with Arduino is co-authored by Arduino co-founder Massimo Banzi, and incorporates his experience in teaching, using, and creating Arduino.


Thursday, February 5, 2015

Beating Heart animation on 8x8 LED Matrix + Arduino Uno

This example run on Arduino uno, animate beating heart on 8x8 LED Matrix.



Example code:
// 2-dimensional array of row pin numbers:
const int row[8] = {
  2, 7, 19, 5, 13, 18, 12, 16
};

// 2-dimensional array of column pin numbers:
const int col[8] = {
  6, 11, 10, 3, 17, 4, 8, 9
};

// 2-dimensional array of pixels:
int pixels[8][8];

int count = 1000;

char str[] = "FABCDEDCBA";
int strLen = sizeof(str);
int ptrChar = 0;


typedef bool charMapType[8][8];

const charMapType charBlank = {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0}
};

const charMapType heart0 = {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0}
};

const charMapType heart1 = {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0}
};

const charMapType heart2 = {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 1, 1, 0, 0, 1, 1, 0},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0}
};

const charMapType heart3 = {
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 1, 1, 0, 0, 1, 1, 0},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0}
};

const charMapType heart4 = {
  {0, 1, 1, 0, 0, 1, 1, 0},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {0, 0, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 1, 1, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0},
  {0, 0, 0, 0, 0, 0, 0, 0}
};

const charMapType *charMap[6] = {&heart0, &heart1, &heart2, &heart3, &heart4, &charBlank};

void setup() {
  // initialize the I/O pins as outputs
  // iterate over the pins:
  for (int thisPin = 0; thisPin < 8; thisPin++) {
    // initialize the output pins:
    pinMode(col[thisPin], OUTPUT);
    pinMode(row[thisPin], OUTPUT);
    // take the col pins (i.e. the cathodes) high to ensure that
    // the LEDS are off:
    digitalWrite(col[thisPin], HIGH);
  }

  //setupScreen();
  setupChar();

}

void loop() {

  // draw the screen:
  refreshScreen();
  
  if(count-- == 0){
    count = 1000;
    setupChar();
  }

}

void setupChar(){
  char c = str[ptrChar];
  int offset = c - 'A';
  
  const charMapType *cMap = charMap[offset];
  //charMapType *cMap = &charDummy;
  
  for (int x = 0; x < 8; x++) {
    for (int y = 0; y < 8; y++) {
      bool v = (*cMap)[x][y];
      
      if(v){
        pixels[x][y] = LOW;
      }else{
        pixels[x][y] = HIGH;
      }
    }
  }
  
  ptrChar++;
  if(ptrChar>=strLen-1){
    ptrChar = 0;
  }

}

void refreshScreen() {
  // iterate over the rows (anodes):
  for (int thisRow = 0; thisRow < 8; thisRow++) {
    // take the row pin (anode) high:
    digitalWrite(row[thisRow], HIGH);
    // iterate over the cols (cathodes):
    for (int thisCol = 0; thisCol < 8; thisCol++) {
      // get the state of the current pixel;
      int thisPixel = pixels[thisRow][thisCol];
      // when the row is HIGH and the col is LOW,
      // the LED where they meet turns on:
      digitalWrite(col[thisCol], thisPixel);
      // turn the pixel off:
      if (thisPixel == LOW) {
        digitalWrite(col[thisCol], HIGH);
      }
    }
    // take the row pin low to turn off the whole row:
    digitalWrite(row[thisRow], LOW);
  }
}


Wednesday, February 4, 2015

Cloud Based Arduino IDE using Codebender

This tutorial is about a cloud based Arduino IDE called Codebender that works as a web browser plugin. Quick and easy setup will have you blinking an LED on your Arduino board in less than 2 minutes!


Sunday, February 1, 2015

Program standalone breadboard Arduino of ATmega328, using Arduino Uno as ArduinoISP

This post show how to program the ATmega328 on a standalone breadboard Arduino. Using Arduino Uno as Arduino ISP.


Connect your breadboard Arduino to Arduino Uno as shown here:

Extra components needed:
- a 16 MHz crystal
- two 22 picofarad capacitors, between the crystal and GND.
- a 10k resistor, between pin 1 of ATMEGA328P and +5V.
- LED and 1K resistor, used in our Blink example. LED cathode connect to GND, anode connect to the 1K resistor, connect to pin 19 of ATMEGA328P.

The basic steps:
- Connect the breadboard to Arduino Uno as shown above.
- Connect Uno to PC using USB.
- Start Arduino IDE, and program the Arduino Uno as ArduinoISP.
- Switch Tools -> Board to our target board.
- Select Tools -> Programmer -> Arduino as ISP.
- Burn Bootloader.
- Compile and upload your sketch.

I suppose the target board is very similar to Nano board, so I select Board of Arduino Nano, and Processor of ATmega328. It success to burn bootloader, but FAIL to upload sketch, with error of:
avrdude: stk500_getsync() attempt x of 10: not in sync: resp=0x1c

As show in this video:

I have to modify boards.txt to add a new board, copy from nano. The file should be locate in the folder arduino-1.5.8/hardware/arduino/avr/. For safety, make a copy before edit.

Find the entry of nano, copy and rename another board, bba.name=BreadBoard Arduino in my case. Modify the content as:
##############################################################
# Create custom board of BreadBoard Arduino
bba.name=BreadBoard Arduino

bba.upload.tool=avrdude
#bba.upload.protocol=arduino

bba.bootloader.tool=avrdude
bba.bootloader.unlock_bits=0x3F
bba.bootloader.lock_bits=0x0F

bba.build.f_cpu=16000000L
bba.build.board=AVR_NANO
bba.build.core=arduino
bba.build.variant=eightanaloginputs

## BreadBoard Arduino w/ ATmega328
## -------------------------
bba.menu.cpu.atmega328=ATmega328

bba.menu.cpu.atmega328.upload.maximum_size=30720
bba.menu.cpu.atmega328.upload.maximum_data_size=2048
bba.menu.cpu.atmega328.upload.speed=57600

bba.menu.cpu.atmega328.upload.using=arduino:arduinoisp

bba.menu.cpu.atmega328.bootloader.low_fuses=0xFF
bba.menu.cpu.atmega328.bootloader.high_fuses=0xDA
bba.menu.cpu.atmega328.bootloader.extended_fuses=0x05
bba.menu.cpu.atmega328.bootloader.file=atmega/ATmegaBOOT_168_atmega328.hex

bba.menu.cpu.atmega328.build.mcu=atmega328p

##############################################################

Re-start Arduino IDE after boards.txt modified and saved.

This video show how to edit the file boards.txt:

Finally, we can program the ATmega328 on breadboard using Arduino Uno as ISP, and select our custom BreadBoard Arduino, of processor ATmega328 as target.

Check this video: