Getting started with Duinopeak GPS Logger Shield-Serial Streaming for NEO-M8N

A GPS-parsing Arduino libraries specifically for M8N are TinyGPSplus-for-Neo-M8N. These libraries simplify the task of parsing the excessive NMEA strings, leaving us with just the few bits of data we care about.

You need to install the libraries on your own Arduino development machine, visit the links above to download them. Reference sparkfun’s Installing an Arduino Librarytutorial for any additional library-installing help you may need.

TinyGPS++ Example for NEO-M8N only

Here’s a quick example, which uses the TinyGPS++ library to parse NMEA strings for position, altitude, time, and date. The code is also available in GPS Shield GitHub repository.

/******************************************************************************
This example uses SoftwareSerial to communicate with the GPS module on
pins 8 and 9. It uses the TinyGPS++ library to parse the NMEA strings sent
by the GPS module, and prints interesting GPS information to the serial
monitor.

After uploading the code, open your serial monitor, set it to 9600 baud, and
watch for latitude, longitude, altitude, course, speed, date, time, and the
number of visible satellites.
******************************************************************************/

#include <TinyGPS++.h> // Include the TinyGPS++ library
TinyGPSPlus tinyGPS; // Create a TinyGPSPlus object

#define GPS_BAUD 9600 // GPS module baud rate. GP3906 defaults to 9600.

// If you’re using an Arduino Uno, Mega, RedBoard, or any board that uses the
// 0/1 UART for programming/Serial monitor-ing, use SoftwareSerial:
#include <SoftwareSerial.h>
#define ARDUINO_GPS_RX 3 // GPS TX, Arduino RX pin
#define ARDUINO_GPS_TX 2 // GPS RX, Arduino TX pin
SoftwareSerial ssGPS(ARDUINO_GPS_TX, ARDUINO_GPS_RX); // Create a SoftwareSerial

// Set gpsPort to either ssGPS if using SoftwareSerial or Serial1 if using an
// Arduino with a dedicated hardware serial port
#define gpsPort ssGPS  // Alternatively, use Serial1 on the Leonardo

// Define the serial monitor port. On the Uno, Mega, and Leonardo this is ‘Serial’
//  on other boards this may be ‘SerialUSB’
#define SerialMonitor Serial

void setup()
{
SerialMonitor.begin(9600);
gpsPort.begin(GPS_BAUD);
}

void loop()
{
// print position, altitude, speed, time/date, and satellites:
printGPSInfo();

// “Smart delay” looks for GPS data while the Arduino’s not doing anything else
smartDelay(1000);
}

void printGPSInfo()
{
// Print latitude, longitude, altitude in feet, course, speed, date, time,
// and the number of visible satellites.
SerialMonitor.print(“Lat: “); SerialMonitor.println(tinyGPS.location.lat(), 6);
SerialMonitor.print(“Long: “); SerialMonitor.println(tinyGPS.location.lng(), 6);
SerialMonitor.print(“Alt: “); SerialMonitor.println(tinyGPS.altitude.feet());
SerialMonitor.print(“Course: “); SerialMonitor.println(tinyGPS.course.deg());
SerialMonitor.print(“Speed: “); SerialMonitor.println(tinyGPS.speed.mph());
SerialMonitor.print(“Date: “); printDate();
SerialMonitor.print(“Time: “); printTime();
SerialMonitor.print(“Sats: “); SerialMonitor.println(tinyGPS.satellites.value());
SerialMonitor.println();
}

// This custom version of delay() ensures that the tinyGPS object
// is being “fed”. From the TinyGPS++ examples.
static void smartDelay(unsigned long ms)
{
unsigned long start = millis();
do
{
// If data has come in from the GPS module
while (gpsPort.available())
tinyGPS.encode(gpsPort.read()); // Send it to the encode function
// tinyGPS.encode(char) continues to “load” the tinGPS object with new
// data coming in from the GPS module. As full NMEA strings begin to come in
// the tinyGPS library will be able to start parsing them for pertinent info
} while (millis() – start < ms);
}

// printDate() formats the date into dd/mm/yy.
void printDate()
{
SerialMonitor.print(tinyGPS.date.day());
SerialMonitor.print(“/”);
SerialMonitor.print(tinyGPS.date.month());
SerialMonitor.print(“/”);
SerialMonitor.println(tinyGPS.date.year());
}

// printTime() formats the time into “hh:mm:ss”, and prints leading 0’s
// where they’re called for.
void printTime()
{
SerialMonitor.print(tinyGPS.time.hour());
SerialMonitor.print(“:”);
if (tinyGPS.time.minute() < 10) SerialMonitor.print(‘0’);
SerialMonitor.print(tinyGPS.time.minute());
SerialMonitor.print(“:”);
if (tinyGPS.time.second() < 10) SerialMonitor.print(‘0’);
SerialMonitor.println(tinyGPS.time.second());
}

You may need to adjust the gpsPort and SerialMonitor defines near the top of the sketch. As it is, the sketch is set up to use the SoftwareSerial port.

After uploading the code, open up your serial monitor to watch the parsed GPS data stream.

If your module doesn’t have a good GPS fix, you’ll probably see a lot of 0’s stream by; the time should be incrementing, although it’ll be incorrect (unless you plugged your Arduino in at exactly midnight!).

If you can find a way to take your computer and Arduino setup outside, that’ll be your best bet for getting a fix. Otherwise, try to take it near an open window. The better view it has of the sky, the better chance it’ll have to find the four satellites it needs.

A successful, fixed GPS stream will look something like this:


For more information on using the TinyGPS++ Library, check out the project homepage.

Getting started with Duinopeak GPS Logger Shield-TinyGPS Serial Streaming for NEO-6M

A couple of our favorite GPS-parsing Arduino libraries are TinyGPS and TinyGPS++. These libraries simplify the task of parsing the excessive NMEA strings, leaving us with just the few bits of data we care about.

You need to install the libraries on your own Arduino development machine, visit the links above to download them. Reference sparkfun’s Installing an Arduino Librarytutorial for any additional library-installing help you may need.

TinyGPS++ Example for NEO-6M only

Here’s a quick example, which uses the TinyGPS++ library to parse NMEA strings for position, altitude, time, and date. The code is also available in GPS Shield GitHub repository.

/******************************************************************************
This example uses SoftwareSerial to communicate with the GPS module on
pins 8 and 9. It uses the TinyGPS++ library to parse the NMEA strings sent
by the GPS module, and prints interesting GPS information to the serial
monitor.

After uploading the code, open your serial monitor, set it to 9600 baud, and
watch for latitude, longitude, altitude, course, speed, date, time, and the
number of visible satellites.
******************************************************************************/

#include <TinyGPS++.h> // Include the TinyGPS++ library
TinyGPSPlus tinyGPS; // Create a TinyGPSPlus object

#define GPS_BAUD 9600 // GPS module baud rate. GP3906 defaults to 9600.

// If you’re using an Arduino Uno, Mega, RedBoard, or any board that uses the
// 0/1 UART for programming/Serial monitor-ing, use SoftwareSerial:
#include <SoftwareSerial.h>
#define ARDUINO_GPS_RX 3 // GPS TX, Arduino RX pin
#define ARDUINO_GPS_TX 2 // GPS RX, Arduino TX pin
SoftwareSerial ssGPS(ARDUINO_GPS_TX, ARDUINO_GPS_RX); // Create a SoftwareSerial

// Set gpsPort to either ssGPS if using SoftwareSerial or Serial1 if using an
// Arduino with a dedicated hardware serial port
#define gpsPort ssGPS  // Alternatively, use Serial1 on the Leonardo

// Define the serial monitor port. On the Uno, Mega, and Leonardo this is ‘Serial’
//  on other boards this may be ‘SerialUSB’
#define SerialMonitor Serial

void setup()
{
SerialMonitor.begin(9600);
gpsPort.begin(GPS_BAUD);
}

void loop()
{
// print position, altitude, speed, time/date, and satellites:
printGPSInfo();

// “Smart delay” looks for GPS data while the Arduino’s not doing anything else
smartDelay(1000);
}

void printGPSInfo()
{
// Print latitude, longitude, altitude in feet, course, speed, date, time,
// and the number of visible satellites.
SerialMonitor.print(“Lat: “); SerialMonitor.println(tinyGPS.location.lat(), 6);
SerialMonitor.print(“Long: “); SerialMonitor.println(tinyGPS.location.lng(), 6);
SerialMonitor.print(“Alt: “); SerialMonitor.println(tinyGPS.altitude.feet());
SerialMonitor.print(“Course: “); SerialMonitor.println(tinyGPS.course.deg());
SerialMonitor.print(“Speed: “); SerialMonitor.println(tinyGPS.speed.mph());
SerialMonitor.print(“Date: “); printDate();
SerialMonitor.print(“Time: “); printTime();
SerialMonitor.print(“Sats: “); SerialMonitor.println(tinyGPS.satellites.value());
SerialMonitor.println();
}

// This custom version of delay() ensures that the tinyGPS object
// is being “fed”. From the TinyGPS++ examples.
static void smartDelay(unsigned long ms)
{
unsigned long start = millis();
do
{
// If data has come in from the GPS module
while (gpsPort.available())
tinyGPS.encode(gpsPort.read()); // Send it to the encode function
// tinyGPS.encode(char) continues to “load” the tinGPS object with new
// data coming in from the GPS module. As full NMEA strings begin to come in
// the tinyGPS library will be able to start parsing them for pertinent info
} while (millis() – start < ms);
}

// printDate() formats the date into dd/mm/yy.
void printDate()
{
SerialMonitor.print(tinyGPS.date.day());
SerialMonitor.print(“/”);
SerialMonitor.print(tinyGPS.date.month());
SerialMonitor.print(“/”);
SerialMonitor.println(tinyGPS.date.year());
}

// printTime() formats the time into “hh:mm:ss”, and prints leading 0’s
// where they’re called for.
void printTime()
{
SerialMonitor.print(tinyGPS.time.hour());
SerialMonitor.print(“:”);
if (tinyGPS.time.minute() < 10) SerialMonitor.print(‘0’);
SerialMonitor.print(tinyGPS.time.minute());
SerialMonitor.print(“:”);
if (tinyGPS.time.second() < 10) SerialMonitor.print(‘0’);
SerialMonitor.println(tinyGPS.time.second());
}

You may need to adjust the gpsPort and SerialMonitor defines near the top of the sketch. As it is, the sketch is set up to use the SoftwareSerial port.

After uploading the code, open up your serial monitor to watch the parsed GPS data stream.

If your module doesn’t have a good GPS fix, you’ll probably see a lot of 0’s stream by; the time should be incrementing, although it’ll be incorrect (unless you plugged your Arduino in at exactly midnight!).

If you can find a way to take your computer and Arduino setup outside, that’ll be your best bet for getting a fix. Otherwise, try to take it near an open window. The better view it has of the sky, the better chance it’ll have to find the four satellites it needs.

A successful, fixed GPS stream will look something like this:

Lat: 40.090422
Long: -105.184534
Alt: 5243.77
Course: 295.56
Speed: 0.01
Date: 26/1/2016
Time: 20:19:34
Sats: 6

For more information on using the TinyGPS++ Library, check out the project homepage.

Getting started with Duinopeak GPS Logger Shield-Hookup Guide and Simple Test

Introduction

The Duinopeak GPS Logger Shield equips your Arduino with access to a GPS module, µSD memory card socket, and all of the other peripherals you’ll need to turn your Arduino into a position-tracking, speed-monitoring, altitude-observing wonder logger.

The shield is based around a uBlox NEO-6M/M8N GPS Module – a 66-channel GPS receiver and an up to 10Hz update rate. The GPS module will stream constant position updates over a simple serial UART, which you can then log to a µSD card and/or use for other position or time-tracking purposes.

Everything on the shield is highly configurable: A switch allows you to select the GPS module’s UART interface between either hardware or software ports, the µSD card operates over a hardware SPI port, which should be compatible with most Arduino layouts, and extra prototyping space should allow you to add those last, few components you need to complete your project.

Selecting the Serial Port

The GPS module communicates via a simple, UART (serial) interface. The UART-select switch allows you to switch that interface between either the Arduino’s hardware UART – on pins D0 and D1 – or a SoftwareSerial port on pins D2 to D7.

Should you need a reference, this table shows the map between GPS module and Arduino UART(s):

 

GPS Pin Arduino Software UART Pin Arduino Hardware UART Pin
RX 2 1 (TX)
TX 3 0 (RX)

 

If you’re using an Arduino Uno or any development board with one, pre-occupied hardware UART, you may be forced to use the software serial port. Fortunately, the GPS module’s baud rate defaults to a slow, steady 9600 bps, which SoftwareSerial shouldn’t have a problem handling.

If you need to change the software serial port pins, they can be custom-set to any other pin by setting the jumpers between pinsD2 to D7.

Power and GPS Fix Status LEDs

This pair of LEDs on the corner of the shield are a handy tool for initial troubleshooting. The green PWR LED is attached to the output of the shield’s on-board 3.3V regulator. If the shield is getting power, this LED should be on.

The red GPS FIX LED is connected the  GPS module’s “FIX” pin. It can be used to identify whether the GPS module has a proper fix or not. When you initially power the shield up, the LED should blink – indicating it’s trying to find a fix and you can rest assured that your GPS module has a good fix on your location.

Hardware Setup

Just stack the GPS Logger Shield on the Peakduino/Arduino UNO,  plug the external active GPS antenna, and plug the USB cable to power up the board.  Then check the green power LED is light on, then everythis is OK.

Note: Make sure your external antenna has a good sight to receive the GPS signal, it is recommend to put the antenna outside the window of your room. NEO-6M is need for this step, NEO-M8N is able to position in the room in the most of the time.

Software Setup

Simple Sketch: GPS Serial Passthrough

Now that your hardware is all set up, we have three pieces of example code to give you a taste of the GPS Logger Shield’s functionality. This first example isn’t all that useful, but it will, at least, make sure everything’s working. Plus it’ll show you the raw ugliness of NMEA GPS strings and make you appreciate great libraries like TinyGPS even more.

This example doesn’t require any additional libraries. Simply plug the shield into your Arduino and upload the example code. We’ve got a couple examples, depending on which Arduino and/or serial port you’re using.

SoftwareSerial Port Example

If you’re using an Arduino Mega, Arduino Uno, Redboard, any other ATmega328P-based Arduino, and have the UART-select jumpers in the SoftwareSerial position(TX-D2 and RX-D3), upload this piece of example code to your Arduino:

/******************************************************************************
This example uses SoftwareSerial to communicate with the GPS module on
pins 8 and 9. SoftwareSerial should work on most Arduinos, but it’s a
necessity on Arduino Mega’s, Arduino Uno’s, RedBoard’s and any other Arduino
based around an ATmega328P.

After uploading the code, open your serial monitor, set it to 9600 baud, and
watch the GPS module’s NMEA strings begin to flow by. See if you can pick
out the latitude and longitude.
******************************************************************************/

#include <SoftwareSerial.h> // Include the SoftwareSerial library
#define ARDUINO_GPS_RX 3 // Arduino RX pin connected to GPS TX
#define ARDUINO_GPS_TX 2 // Arduino TX pin connected to GPS RX
#define GPS_BAUD_RATE 9600 // The GPS Shield module defaults to 9600 baud
// Create a SoftwareSerial object called gps:
SoftwareSerial gpsPort(ARDUINO_GPS_TX, ARDUINO_GPS_RX);

// We’ll also define a more descriptive moniker for the Serial Monitor port.
// This is the hardware serial port on pins 0/1.
#define SerialMonitor Serial

void setup()
{
gpsPort.begin(GPS_BAUD_RATE);
SerialMonitor.begin(9600);
}

void loop()
{
if (gpsPort.available()) // If GPS data is available
SerialMonitor.write(gpsPort.read()); // Read it and print to SerialMonitor
if (SerialMonitor.available()) // If SerialMonitor data is available
gpsPort.write(SerialMonitor.read()); // Read it and send to GPS
}

This example uses the SoftwareSerial library to communicate with the GPS module, and leaves the hardware serial port for debugging with the serial monitor.

Open up your serial monitor and set the baud rate to 9600. You should immediately begin to see GPS NMEA data begin to flow by at a rate of 1Hz.

For example, one set of strings may look like:

Now we could use uBlox’s GUI tool to view the GPS stream data visually.

Dowload the GUI tool from uBlox’s website and install it.

Choose your COM port of your Arduino board and click the magic wand for autobauding.

Now, wait a second for the GPS to fix, the TP LED should blink. The blow visual data is indoor positioning(NEO-M8N only, NEO-6M must position outdoor), outdoor will be more fast and effective.

Hardware Serial Port Example

If you use Peaduino UNO Geek Edition, just very simple, set the UART-select jumpers in the HardwareSerial position(TX-D0 and RX-D1) then slide the FTDI switch to “MCU OFF”, open the Serial monitor you will get the GPS stream.

Open up your serial monitor and set the baud rate to 9600. You should immediately begin to see GPS NMEA data begin to flow by at a rate of 1Hz.

For example, one set of strings may look like:

If you’re using an Arduino UNO, or any other Arduino UNO compatible with no free UART on pins 0/1, set the UART-select jumpers in the HardwareSerial position(TX-D0 and RX-D1), and upload this example:

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

Once you’ve uploaded the sketch, open up your serial monitor and set the baud rate to 9600. You should immediately begin to see GPS NMEA data begin to flow by at a rate of 1Hz.

For example, one set of strings may look like:

If you’re using an Arduino Leonardo, Arduino Due, Arduino Zero, or any other Arduino with a free UART on pins 0/1, set the UART-select jumpers in the HardwareSerial position(TX-D0 and RX-D1), and upload this example:

/******************************************************************************
This example uses an Arduino’s hardware serial port — on pins 0 and 1 — to
communicate with the GPS module.

Hardware serial should work on any Arduino’s with a free hardware serial
UART on pins 0/1. That includes Arduino Leonardo, Zero, Due, and SparkFun’s
SAMD21 Dev Board.

After uploading the code, open your serial monitor, set it to 9600 baud, and
watch the GPS module’s NMEA strings begin to flow by. See if you can pick
out the latitude and longitude.
******************************************************************************/

#define GPS_BAUD_RATE 9600 // The GPS Shield module defaults to 9600 baud

// Define the serial monitor port. On the Leonardo this is ‘Serial’
//  but on other boards this may be ‘SerialUSB’
#define SerialMonitor Serial // e.g. Arduino Leonardo
// Define the harware serial port on pins 0/1. On the Leonardo this is ‘Serial1’
//  but on other boards this may be ‘Serial’
#define gpsPort Serial1 // e.g. Arduino Leonardo
// See https://www.arduino.cc/en/Reference/Serial to find out which Serial ports
//  you should use in the defines above.

void setup()
{
SerialMonitor.begin(9600); // Initialize the serial monitor port at 9600 baud
gpsPort.begin(GPS_BAUD_RATE); // The GPS module’s default baud is 9600
}

void loop()
{
if (gpsPort.available()) // If GPS data is available
SerialMonitor.write(gpsPort.read()); // Send it to the serial monitor
if (SerialMonitor.available()) // If data is sent to the serial monitor
gpsPort.write(SerialMonitor.read()); // send it to the GPS module
}

You may have to alter either or both of the serial port #defines at the top of the code. Refer to your development board’s datasheet or product info page for more information on which serial port is which.

Using the Serial Passthrough Sketch

Once you’ve uploaded the sketch, open up your serial monitor and set the baud rate to 9600. You should immediately begin to see GPS NMEA data begin to flow by at a rate of 1Hz.

For example, one set of strings may look like:

$GPRMC,235316.000,A,4003.9040,N,10512.5792,W,0.09,144.75,141112,,*19 $GPGGA,235317.000,4003.9039,N,10512.5793,W,1,08,1.6,1577.9,M,-20.7,M,,0000*5F $GPGSA,A,3,22,18,21,06,03,09,24,15,,,,,2.5,1.6,1.9*3E

If you don’t see anything in the serial monitor, make sure the UART-select jumper is in the correct position. Also double check that the green “power” LED is at least light up. If it’s not, the module may not be receiving power. Don’t forget place the external antenna outside the window of your room!

NMEA strings are the standard message format produced by almost all GPS receivers. They can relay all sorts of information including the time, latitude, longitude, altitude, and number of satellites visible, but unless you’re an incredibly fast parser, these sentences will mostly mean nothing. Fortunately, the Arduino can read those strings, parse them for you, and give you more human-readable pieces of data.

Getting started with Duinopeak GPS Logger Shield-Introduction & Overview

The Duinopeak GPS Logger Shield equips your Arduino with access to a GPS module, µSD memory card socket, and all of the other peripherals you’ll need to turn your Arduino into a position-tracking, speed-monitoring, altitude-observing wonder logger. The shield is based around a uBlox’s NEO-6M/M8N GPS Module – a 66-channel GPS receiver featuring a MediaTek MT3339 architecture and up to a 10Hz update rate. The GPS module will stream constant position updates over a simple TTL-level serial port, which you can then log to a µSD card and/or use for other purposes.

Everything on the shield is highly configurable: A switch allows you to select the GPS module’s UART interface between either hardware or software ports,The regular GPS pins(RX,TX) can be connected to D0-D7 of Arduino.  The µSD card operates over a hardware SPI port, which should be compatible with most Arduino layouts. The GPS Logger Shield’s main voltage supply is taken from the Arduino 5V header pin. This voltage is regulated down to 3.3V, which is supplied to both the GPS module and the µSD card. These two components should consume, about 30mA on average, but they may very occasionally spike to around 100mA.

Features:

  • On-Board uBlox’s NEO-6M/M8N GPS Module
  • Concurrent reception of up to 3 GNSS (GPS, Galileo, GLONASS, BeiDou)
  • External active GPS antenna design with high receive sensitivity, compatible normal antenna
  • Extremely fast time to first fix at low signal level
  • Indoor positioning(NEO-M8N only)
  • Onboard rechargeable battery enable backup parameters ablity
  • µSD memory card socket
  • Standard Arduino sized shield
  • Arduino reset button
  • Selectable UART jumper controls serial communications

Hardware Overview:

Here’s a quick overview of each pin mapping:

Pin Label In/Out Board Connection Pin Description
GND In Ground GPS module ground (0V reference)
SD_CS In Arduino D8 Enable the SD card operation
RX In Arduino D0-D7 Serial data input
TX Out Arduino D0-D7 Serial data output
FIX Out GPS Fix LED GPS fix indicator – blink once a fix is valid
VBAT In rechargeable battery Backup power – keeps the RTC running (2.0-4.3V input range)
3V3 In On-board 3.3V regulator 3.3V power supply input

Layout:

Schematic diagram:

 

Datasheet:

https://www.u-blox.com/en/product/neo-6-series

https://www.u-blox.com/en/product/neo-m8-series

Getting Started with BLE Shield-Connect with Android phone

First of all, we need let the device works on Slave mode, so the Android phone master device can find the BLE shield.

Prepare the hardware.

Stack the BLE shield on the Peakduino UNO, make sure you use right soft serial port, here we use 2-RX, 3-TX.

 

Upload the sketch.

#include <SoftwareSerial.h>   //Software Serial Port
#define RxD 2
#define TxD 3

#define DEBUG_ENABLED  1

SoftwareSerial BLE(RxD,TxD);

void setup()
{
Serial.begin(9600);
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);
setupBleConnection();
Serial.println(“Setup done, entering into serial mode.”);
}

void loop()
{
char recvChar;
while(1){
if(BLE.available()){//check if there’s any data sent from the remote BLE shield
recvChar = BLE.read();
Serial.print(recvChar);
}
if(Serial.available()){//check if there’s any data sent from the local serial terminal, you can add the other applications here
recvChar  = Serial.read();
BLE.print(recvChar);
}
}
}

void setupBleConnection()
{
BLE.begin(9600); //Set BLE BaudRate to default baud rate 9600
delay(3000);
BLE.print(“AT+CLEAR”); //clear all previous setting
delay(1000);
readBluetooth();
BLE.print(“AT+NAMEBLE Slave”); //clear all previous setting
readBluetooth();

BLE.print(“AT+ROLE0”); //set the bluetooth name as a slaver
readBluetooth();
BLE.print(“AT+ROLE?”); //set the bluetooth name as a slaver
readBluetooth();
BLE.print(“AT+SAVE1”);  //don’t save the connect information
readBluetooth();
BLE.print(“AT+SAVE?”);  //don’t save the connect information
readBluetooth();
BLE.print(“AT+BAUD?”);  //don’t save the connect information
readBluetooth();

}

void readBluetooth(){
delay(1000);
char recvChar=0;
String recvBuf=””;
while(BLE.available()){
recvChar = BLE.read();
recvBuf += recvChar;
}
Serial.println(recvBuf);
//BLE.flush();
}

When the upload done, open the serial monitor, you should see the print:

Now, install the app on your Android phone.

Copy the APK file to your Android phone.

Click to install and open the software.

Click the button “搜索设备” to scan the BLE devices. You should see the “BLE Slave” device list below.

Then click the “BLE Slave” icon to open a session with the device.

As you can see the “连接成功” means the Android phone has connected with BLE shield.

Now the Android phone can communicate with BLE shield, try type some characters and see the PC side receive.

Getting Started with Duinopeak Luban 3D Print Kit-Simple Testing

After complete all above configurations, we could do a simple testing now. Remember to choose correct COM port of your RAMBo and click upload, uploading success as shown below:

After upload success, your Luban LCD Console will be light up and show the interface. There will be an error if you not wring the temperature sensor to T0 socket normally, so just ignore it. However we can perform other operations, such as scroll the menus, and insert a micro-sd card to testing load files from SD card.

The actually results are shown below:

Thank you following the tutorial and please looking forward our other tutorials.

If you wish we write other tutorials please let us know.

Getting Started with Duinopeak Luban 3D Print Kit-Prepare

Prepare Hardwares

In order to prevent damage from electrostatic discharge, do note before releasing your electrostatic, touch metal objects,like metal faucet or washing hands, 🙂

OK, open your 3D printing Kit, this tutorial uses the version of RAMBo 1.1b, you need to correctly set up the power supply jumper to USB side, because we use USB supply in this tutorial. As shown below:

Then connect the Luban LCD Console and the RAMBo Controller board, as shown below:

 

Software

ARDUINO IDE SETUP

We will first download the Arduino IDE from Arduino’s website available at the following address : http://arduino.cc/en/Main/Software.

Note: The Arduino IDE has configuration files for various Arduino products. So make sure you use Arduino IDE is version 1.0.5.

In order to use the LCD and take advantage of the full capabilities of the RAMBo, we will install an Arduino Addon for RAMbo by downloading it from the following URL :

Arduino IDE 1.05 Addon for RAMBo

Download the zip file and extract to you local disk which you prefer.

The file structure should be like this:

Then we need set the Arduino IDE’s Sketchbook location path, Click File->Preferences:

Copy your Luban addon folder path and paste into Sketchbook location and click OK.

Now restart your Arduino IDE.

At this point, the Arduino IDE has been set-up to work with the RAMBo. You only need to select the Serial Port the RAMBo appears on. You can now select the type of board you will use. In the case of the RAMBo, selecting the ” RAMBo “, as seen below, will work. However, this will not allow you to use extended features of your board, such as the LCD display.

Getting Started with Balanbot-Remote Control

Remote control

Prepare

  • Install the Android software(apk) into your Android phone.
  • Fully assembled Balanbot
  • Android phone(android version 4.0 or above)

Just download the apk into your Android phone and install it, you can find a icon named “Balanbot” in your application list of your phone as below.

Lay down the Balanbot, do not power off it, make sure the bluetooth dongle inserted in the USB hub and the bluetooth dongle should light up. Open the Balanbot App of your phone.

Note: The bluetooth should open before use the software, if not the software will request to open the Bluetooth then closed, just reopen it!

Click the bluetooth icon(the top right of the screen) and click to search the bluetooth devices, the bluetooth shoul find the device named “Balanbot*” as below.

choose it will popup the bluetooth pair window, what we need to do is input the paring code:”1234″  or “0000” (Balanbot v2.0)and click OK to confirm.

After connected to the Balanbot we can use didfferent ways to control it or view the pid params, IMU graphics and infomation of the Balanbot.

Getting Started with Balanbot-Setup the development environment

In this chapter we will set up the development environment of the Balanbot v2.0.

Note: Balanbot2 fully compatible with Balanduino 1.3. So you might want to use Balanduino’s firmware, yes it is possible now!

Prepare

Software

Hardware:

  • USB Cable
  • Balanbot

Setup Arduino dev environment.

Please use arduino 1.56 or above Otherwise will get a compile error.

Unpack the Source code file to your local disk. The file structure should same as follow.

Set arduino work path to your source folder.

Open File->Preferences, Sketchbook location, click OK and reopen your arduino ide.

Then connect USB cable to your balanbot, for windows, will popup new hardware installation.

Upack the driver to your local disk and locate the driver path to driver path of the new hardware installation. After install a new Serial port will appear, see your device management.

Next open the demo, Open File-> Sketchbook->Balanbot.

Before next step make sure your ide Tools->Board has Balanbot menu. If this not appear check your Sketchbook folder contains hardware folder.

Then select Tools->Revision Revision 1.3

And choose the newly installed Serial port, my is COM36.

OK, we can upload the demo code now. Click the upload icon to upload. When uploading the rx and tx led of balanbot near the USB socket.

We could see arduino ide says:”Done uploading.” when it’s done.

Open the serial monitor, also you will hear a “Beep”, indicate the initial was succeed.

Note: When you replace the main IC ATMega1284P with new one. You need do this step.

Type CR; and press Enter to restore default EEPROM values.

Next we need calibrate motors, before calibrate motors you need place balanbot’s wheel upward. Then type MC; and press Enter in Serial monitor.

Now will print the both motor encoder readings.

According the tips complete calibrate motors.

Now you got you balanbot ready to go.

Now pull out usb cable and plug in bluetooth dongle to balanbot USB host socket.

Note:

  • Everytime balanbot need calibrate it’s sensor. And the initial position is put the balanbot on the it’s side.
  • Balanbot initial success will make a “Beep”.
  • You should connect balanbot’s bluetooth before it’s lift.