CONTENTS

GETTING STARTED


Power on your LattePanda


You can power your LattePanda through the micro USB port or through the CN2 header pins.
Note: Check your power adapter and USB cable connection before use - insufficient or unstable current may prevent your LattePanda from initializing.
A power adapter will not be bundled with the board, but you may get one from our online store or any electronics retailer.

Here’s our list of recommended power adapters and cables


MicroUSB

Any standard USB adapter (such as a cell phone wall charger) with at least 2A of current can be used as a power supply for the LattePanda.

When you have an adapter and micro USB cable ready, follow the instructions below to get started.

1. Connect the USB into the USB power adapter, and the microUSB into the micro USB port of the LattePanda (The micro USB port is located next to the SD card socket).

If you are using the 7" display/touch panel, please connect it before powering on your device


2. When plugged in, you should see the red LED indicator lights up on the underside of the board. This means that the LattePanda is initializing. Wait patiently for a few seconds until the LED goes out.

Note: Do not unplug the power cable while the system is running. (If the red LED is on, this indicates that the is system is running)


  1. When the LED turns off, press and hold the power button for one second to turn the LattePanda on. You should see the LED lights up again

    CN2 Header Pins
    If you use the CN2 header pins, you will need to create an adapter. Using a barrel jack connector and dupont cables is a very effective solution, see this post on our forum for more information.

Connect with your peripheral device


LattePanda is compatible with a wide range of peripheral devices. You may connect any USB supported devices, such flash drives, mouse and keyboard, or a webcam to USB 3.0 and 2.0 ports. The SD card socket supports extra storage from a mini SD card. You may also connect the LattePanda to an external speaker device through its 3.5mm audio jack. The LattePanda’s Arduino compatible co-processor with plug and play headers and GPIO pins supports standard 5V sensors and actuators that enable it to interact with the physical world. 4.35.05

Connect to Wi-Fi

1.Install the Wi-Fi antenna by plugging the round shaped end into the socket labelled “ANT” located next to the GPIO pins on the board.
wifi antenna
2.In Windows select a Wi-Fi connection by clicking the Wi-Fi icon in the system tray at the bottom right of the screen. Follow the wizard to setup a connection. Note: A weak Wi-Fi signal may prevent a Wi-Fi connection being established. Check the antenna is connected properly to the board and make sure that a Wi-Fi network is available.

Connect with 7“ Display and Touch Panel Overlay

Note:Please connect it with LattePanda BEFORE power-on. And make sure the Golden Finger face the right side.
The contacts on FPC are so compact and in order. Please be careful that any dislocation connection may cause the LattePanda short circuit and the IPS display abnormal like ghosting or flicker.
  1. Lift up the actuator. Use thumb or index finger might be easier.
  1. Insert display FPC in.
    Place Golden Finger side down!
Note: The FPC must be fully inserted in the connector. If not fully inserted, the actuator will not close properly. Should this be the case, lift up the actuator and repeat the process (starting with Step 1 above)
  1. Rotate down the actuator until firmly closed.
  1. Insert the FPC of touch panel in
    Same as the display. Place the Golden Finger side down too.

Software & Operating Systems

Setting up a VNC server on the LattePanda using TightVNC

Introduction

Using a VNC server will enable you to access the GUI of Windows running on your LattePanda from a different PC on your local network. TightVNC is a free and easy to set up service.
VNC stands for “Virtual Network Computing”. It is a way of transmitting the keyboard and mouse events of one computer to another - in other words using one computer to remote control another. This is useful because you might not have extra monitors, keyboards or mice lying around – using a VNC service enables you to access several computers on your local network using just one computer, monitor, keyboard and mouse. You might also have a headless server set up which doesn’t require constantly attached peripherals. Setting up a VNC server on your headless server is a handy way to interface with a GUI if and when you need it. Let’s get started:

Step 1 - Installation

  1. Download and install TightVNC for Windows on your LattePanda. Choose 32-bit or 64-bit depending on your system architecture.
    (LattePanda Standard is 32-bit, LattePanda Enhanced is 64-bit)
    Download
    vnc_image001

  2. End-User Licence Agreement
    Accept the licence agreement and click next
    vnc_image002

  3. Choose Setup Type
    Typical installation will install both TightVNC server and TightVNC viewer on your LattePanda
    Custom installation allows you to select which elements to install. Really all we need is the server, unless you would like to be able to view other PCs on your network through the LattePanda, in which case you will need the viewer as well.
    For this tutorial we will just do the typical install.
    vnc_image003

  4. Select Additional Tasks
    Check all the boxes
    vnc_image004

  5. Ready to Install TightVNC
    Click Install to begin!
    vnc_image005

  6. TightVNC Server: Set Passwords
    Password-based A
    vnc_image005
    At this point it is wise to set a password for remote access. Point the radio button towards “Require password-based authentication” and choose a password. Retype it in the following box.
    I have set the password as “lattepan” (as the password can’t be longer than 8 characters)

  7. Administrative Password
    This is not strictly necessary. In this tutorial I will not set an administrative password, but you may if you wish. If you set a password for this you will have to enter it before changing any configuration settings.
    When you are happy with your settings, click “OK”. Click “Finish” to exit the setup wizard.

Step 2 - Configuration

You should now see a new icon in your system tray. (If you don’t, try logging out and logging back in to your PC).
vnc_image007
Here you can see the IP address your PC is on.
Double click it to bring up the service configuration window. The default settings should be fine for our purposes.
vnc_image008
Next, you will need to go on to the computer you would like to control the LattePanda with and using the same installation package, install TightVNC viewer. When you have successfully installed TightVNC viewer, check that you are on the same network as your LattePanda, otherwise it will not work!
When you are certain that your computer and the LattePanda are on the same local network, proceed to step 3

Step 3 - Testing

vnc_image009
Open TightVNC Viewer. A window will appear for a new TightVNC Connection. At this point, you need to input the IP address of your LattePanda.
vnc_image010
Tip: A quick way of finding this is if you hover over the system tray TightVNC icon on your LattePanda. A hint will pop up with “TightVNC Service - ” You could also go in to your router control interface and look for attached devices. The next step is to input this IP address in the New TightVNC Connection Window, followed by the port number you set in the service settings. The default is port 5900.
<ip address of LattePanda>:<port number>
e.g. 192.168.2.60:5900 Click connect. If all goes well you will be prompted with a password input. Input the password you set earlier. My password was “lattepan”. Press enter.
vnc_image011
You will be greeted by a window containing your LattePanda’s GUI! You may now control it remotely!
vnc_image012
This concludes the LattePanda VNC tutorial. If you have any questions or comments please let us know in the forum. I hope this has been of help to you.

Hardware & Accessories

Inputs and Outputs

In this article we will discuss the images of the Lattepanda. Below is a basic diagram that displays all the pins: image1 Pinouts in area U1 are assigned to the X-Z8300 core.
Pinouts in area U2 are assigned to the ATmega32u4 core. Each of the 20 digital pins (A0 - A5, D0 - D13) in area U2 can be used as an input or output, each operating at 5 volts. Each pin can output or receive 40 mA and each has an internal pull-up resistor (disconnected by default) of 20-50k ohm.
Caution: Exceeding 40mA on any I/O pin may cause permanent damage to the ATmega32u4. Some pins have specialized functions:
Analog Inputs: A0 - A5, A6 - A11 (on D4, D6, D8, D9, D10, and D12). The LattePanda has 12 analog inputs, labeled A0 through A11, all of which can also be used as digital I/O. Each pin has a 10 bit resolution (i.e. 1024 different values). By default they measure from ground to 5 volts.
Serial: D0 (RX) and D1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
External Interrupts: D3 (interrupt 0), D2 (interrupt 1), D0 (interrupt 2), D1 (interrupt 3) and D7 (interrupt 4). These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
PWM: D3, D5, D6, D9, D10, and D13 provide 8-bit PWM output.
SPI: D16 (MOSI), D14 (MISO), D15 (SCK).
LED: D13 There is a built-in LED driven by digital pin 13. When the pin's val
TWI: D2(SDA), D3(SCL). Other pins on the board:
Reset:
Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.

How to access pinouts from Visual Studio

LattePanda.Firmata

LattePanda.Firmata is an open-source Firmata library provided by LattePanda, which is suitable for Windows apps developed in Visual Studio. This class allows you to control Arduino GPIO from Windows apps, with features including:
● Reading and writing to digital pins
● Reading analog inputs
● Controlling servo motors
● Sending data to devices and receiving data form devices through the I2C Bus

3 Steps to Your Remote Arduino Project

  1. Set up your PC
  2. Set up the Arduino(It is pre-installed, unless you changed the Arduino program)
  3. Create a project or use the sample project

Functionality

Constructor

  • public Arduino();
  • public Arduino(string serialPortName, Int32 baudRate, bool autoStart, int delay);
  • public Arduino(string serialPortName);
  • public Arduino(string serialPortName, Int32 baudRate);
    There are four different constructors, you can choose the proper one depending on your needs
    Parameters
    serialPortName:Specify serial port name which you can find in the Device Manager
    baudRate: It specifies the serial port speed, the value must be the same as Arduino Firmata. The default value is 57600.
    autoStart: Connect the Arduino automatically when it is true. Default value: True
    delay: Set the maximum interval in seconds of serial connection timeout. Default time: 8 Seconds

Configuration

  • public void pinMode (int pin, byte mode);
    Sets the mode of the specified pin as you wish
    Parameters
    pin: the number of the pin whose mode you wish to set
    mode: Arduino.OUTPUT, Arduino.INPUT, Arduino.PWM, Arduino.SERVO
    Returns
    None

Digital

  • public void digitalWrite (int pin, byte value);
    Write to a digital pin that has been toggled to output mode with pinMode() method
    Parameters
    pin: The digital pin to write to
    value: Arduino.HIGH, Arduino.LOW
    Returns
    None
  • public int digitalRead(int pin);
    Returns the last known state of the digital pin
    Parameters
    pin: The Arduino digital input pin
    Returns
    Arduino.HIGH or Arduino.LOW
  • public event DigitalPinUpdated digitalPinUpdated;
    Call this Callback function when the digital value of the pin whose mode has been set as Arduino.INPUT update
    Delegate
    public delegate void DigitalPinUpdated(byte pin, byte state);
    Parameters
    pin: the pin whose value will update
    state: Arduino.HIGH, Arduino.LOW
    Returns
    None

Analog

  • public void analogWrite(int pin, int value);
    Write to an analog pin using Pulse-width modulation (PWM)
    Parameters
    pin: Analog output pin
    value: PWM frequency from 0 (always off) to 255 (always on)
    Returns
    None
  • public int analogRead(int pin);
    Returns the last known value of the analog pin
    Parameters
    pin: The Arduino analog input pin(0~5)
    Returns
    int:A value representing the analog value between 0 (0V) and 1023 (5V)
  • public event AnalogPinUpdated analogPinUpdated;
    Call this function when the analog value of pin whose mode has been set as Arduino.INPUT update
    Delegate
  • public delegate void AnalogPinUpdated(int pin, int value);
    Parameters
    pin: the pin whose value update
    value: A value representing the analog value between 0 (0V) and 1023 (5V)
    Returns
    None

Servo

  • public void servoWrite(int pin, int angle); Write the angle to specified pin which has been set the mode as Servo
    Parameters
    pin: Servo output pin.
    value: Angle from 0 to 180.
    Returns
    None

I2C/TwoWire

  • public void wireBegin(Int16 delay);
    Initiate the Wire library and join the I2C bus as a master. This should normally be called only once
    Parameters
    delay: the number of milliseconds to pause (ms).
    Returns
    None
  • public void wireRequest(byte slaveAddress,Int16 slaveRegister, Int16[] data,byte mode);
    Request I2C devices to send or receive data, then call didI2CDataReveive event to handle data when receive data.
    Parameters slaveAddress: the 7-bit address of the device to request bytes from
    slaveRegister: Specify the register that you want to store data or read data, choose Arduino.NONE if there is empty.
    data:
    1. when set the Parameter mode as Arduino.I2C_MODE_WRITE ,the data such as {0x00,0x01} will be sending to devices through I2C BUS.
    2. when set the Parameter mode asArduino.I2C_MODE_READ_ONCE or Arduino.I2C_MODE_READ_CONTINUOUSLY , data specify the length of received data.
    mode:
    1. Arduino.I2C_MODE_WRITE :Send data
    2. Arduino.I2C_MODE_READ_ONCE : Receive data once
    3. Arduino.I2C_MODE_READ_CONTINUOUSLY :Receive data continuous
    4. Arduino.I2C_MODE_STOP_READING :Stop receiving data
Returns
None
  • public event DidI2CDataReveive didI2CDataReveive;
    Call this event when receive I2C data.
    Delegate
    public delegate void DidI2CDataReveive(byte address ,byte register, byte[] data);
    Parameters
    address: : Specify slave computer address
    register:: Specify register address
    data: : Data returned
    Returns
    None

Examples

digitalWrite

In this example, we will blink the LED which is connected with digital pin (D0 - D13)
API Required :
  1. public Arduino();
  2. public void pinMode(int pin, byte mode);
  3. public void digitalWrite(int pin, byte value);
Hardware Required:
  1. LattePanda x 1
  2. led x 1 (or you can use the LED attached to pin 13 on the Arduino board itself)
Circuit:
  1. LED inserted directly into pin 13
    _example_blink
Code:
  1. Create a new project in Visual Studio, Refer to Create a project
  2. Main function code :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace blinkYourBoard//project name
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    arduino.pinMode(13, Arduino.OUTPUT);//Set the digital pin 13 as output
    while (true)
    {
    // ==== set the led on or off
    arduino.digitalWrite(13, Arduino.HIGH);//set the LED on
    Thread.Sleep(1000);//delay a seconds
    arduino.digitalWrite(13, Arduino.LOW);//set the LED off
    Thread.Sleep(1000);//delay a seconds
    }
    }
    }
    }
Test:
  1. Click Debug button to execute, the LED will start blinking.

digitalRead

This example detects the Button state through digital pin (D0-D13). API required:
  1. public Arduino();
  2. public void pinMode(int pin, byte mode);
  3. public int digitalRead(int pin);
Hardware Required:
  1. LattePanda x 1
  2. Button x 1
  3. Resistor (Resistance value greater than 1KΩ) x 1
Circuit:
  1. Connect button to pin 12 as following figure shows
    _example_button
Code:
  1. Create a new project in Visual Studio, refer to Create a project
  2. Main function code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace buttonDemo//your project name
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    arduino.pinMode(12, Arduino.INPUT);// Set the digital pin 12 as input
    int Value = arduino.digitalRead(12);// Read the state of pin 12 once.
    Console.WriteLine(Value);
    arduino.digitalPinUpdated += Arduino_digitalPinUpdated;//
    Add Event Listeners and call it when the digital input update.
    }
    private static void Arduino_digitalPinUpdated(byte pin, byte state)
    {
    Console.WriteLine(pin);
    Console.WriteLine(state);
    }
    }
    }
Test:
  1. Click Debug to execute, then the screen will print the value when you push down or release the button

PWM

This example assigns a pulse width modulation (PWM) value to an output pin (D3, D5, D6, D9, D10, D11) to dim or brighten an LED API Required:
  1. public Arduino();
  2. public void pinMode(int pin, byte mode);
  3. public void analogWrite(int pin, int state);
Hardware Required:
  1. LattePanda x 1
  2. LED x 1
Circuit:
  1. LED connected directly into pin 11 as following figure shows
    _example_PWM
Code:
  1. Create a new project in Visual Studio, refer to Create a project
  2. Main function code
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace analogWriteExample
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    arduino.pinMode(11, Arduino.PWM);
    while (true)
    {
    for (int i = 0; i <= 255; i++)
    {
    arduino.analogWrite(11, i);
    Thread.Sleep(4);//delay 4ms
    }
    for (int i = 255; i >= 0; i--)
    {
    arduino.analogWrite(11, i);
    Thread.Sleep(4);//delay 4ms
    }
    }
    }
    }
    }
Test:
  1. Click Debug to execute, you will find the LED brightness vary form dim to bright and then back again.

analogRead

This example detect the value of analog pin (A0-A5) where a potentiometer is connected, and then print the value API Required:
  1. public Arduino();
  2. public int analogRead(int pin);
  3. public event AnalogPinUpdated analogPinUpdated;
Hardware Required:
  1. LattePanda x 1
  2. Potentiometer x 1
Circuit:
  1. Connect the potentiometer to pin 3 as following figure shows:
    _example_analogRead
Code :
  1. Create a new project in Visual Studio, refer to Create a project
  2. Main function Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace analogWriteExample
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    int Value = arduino.analogRead(3);//Read the state of pin 3
    Console.WriteLine(Value);
    arduino.analogPinUpdated += Arduino_analogPinUpdated; ;//Add Event Listeners and call it when the analog input update.
    }
    private static void Arduino_analogPinUpdated(int pin, int value)
    {
    if(pin==3)
    {
    Console.WriteLine(pin);
    Console.WriteLine(value);
    }
    }
    }
    }
Test:
  1. Click Debug to execute, the state of potentiometer will print when you rotate it.

Servo

In this example, we will sweep the servo motor back and forth across 180 degrees. API Required:
  1. public Arduino();
  2. public void pinMode(int pin, byte mode);
  3. public void servoWrite(int pin, int angle);
Hardware Required:
  1. LattePanda x 1
  2. Servo Motor x 1
Circuit:
  1. Servo inserted directly into pin D9:
    _example_Servo
Code :
  1. Create a new project in Visual Studio, Refer to Create a project
  2. Main function code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace analogWriteExample
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    arduino.pinMode(9, Arduino.SERVO);
    while (true)
    {
    arduino.servoWrite(9, 180);//tell the servo motor go to the position in 180 degrees
    Thread.Sleep(1000);//delay a seconds
    arduino.servoWrite(9, 0);//tell the servo motor go to the position in 0 degrees
    Thread.Sleep(1000);//delay a seconds
    }
    }
    }
    }
Test:
  1. Click debug to execute, you will find the motor sweeping forth and back continuously.

I2C

This example will show you how to use I2C to get the data form 3-axis accelerometer ADXL345 API Required:
  1. public Arduino();
  2. public void wireBegin(Int16 delay);
    3.public void wireRequest(byte slaveAddress,Int16 slaveRegister, Int16[] data,byte mode);
  3. public event DidI2CDataReveive didI2CDataReveive;
Hardware Required:
  1. LattePanda x 1
  2. ADXL345 x 1
Circuit:
  1. The following is a figure describing which pins on the LattePanda should be connected to the pins on the accelerometer.
    _example_ADXL345
Code :
  1. Create a new project in Visual Studio, Refer to Create a project
  2. Main function code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Threading;
    using LattePanda.Firmata;
    namespace analogWriteExample
    {
    class Program
    {
    static Arduino arduino = new Arduino();//create an instance and initialize with the default parameters
    static void Main(string[] args)
    {
    arduino.wireBegin(200);
    arduino.wireRequest(0x53, 0x2D, new Int16[] { 8 }, Arduino.I2C_MODE_WRITE);//Write data{8} to I2C
    arduino.didI2CDataReveive += Arduino_didI2CDataReveive;//did I2C Data Reveive
    arduino.wireRequest(0x53, 0x32, new Int16[] { 6 }, Arduino.I2C_MODE_READ_CONTINUOUSLY);//Read data form I2C data
    }
    private static void Arduino_didI2CDataReveive(byte address, byte register, byte[] data)
    {
    Console.WriteLine(BitConverter.ToInt16(data, 0));
    Console.WriteLine(BitConverter.ToInt16(data, 2));
    Console.WriteLine(BitConverter.ToInt16(data, 4));
    }
    }
    }
Test:
  1. Click Debug to execute, the 3-axis acceleration data will be printing continuous.

Set up your PC

  1. Download Visual Studio 2015 Here
    image2
  2. Enable developer mode on your operating system
    image4
    image5
    image6

Set up the Arduino

  1. Open Arduino. And select the “StandardFirmata”
    image16

  2. Select “Arduino Leonardo”
    image17

  3. Select your COM port
    image18

  4. Upload the sketch
    image19

  5. Upload Done!
    image20

Blink your Board

  1. Open Visual Studio 2015 and create a new app:
    createProject1
    createProject2
  2. Download the LattePanda.Firmata class library

  3. Add the downloaded class library to your project Open your Solution Explorer and right-click in the blank area, then add existing item.
    addCode
    addClass1

  4. Add the following code to Program.cs.

    • Add the following two lines code before the namespace blinkYourBoard.
      using System.Threading;
      using LattePanda.Firmata;
      The first namespace contributes to delay and second is LattePanda.Firmata class library namespace
    • Add the following code in the Main Function
      Arduino arduino = new Arduino();
      arduino.pinMode(13, Arduino.OUTPUT);//Set the digital pin 13 as output
      while (true)
      {
      // ==== set the led on or off
      arduino.digitalWrite(13, Arduino.HIGH);//set the LED on
      Thread.Sleep(1000);//delay a seconds
      arduino.digitalWrite(13, Arduino.LOW);//set the LED off
      Thread.Sleep(1000);//delay a seconds
      }
      The complete code is as follows:
      addCode
  5. Finally debug your project
    Connect your Arduino and click Start
    start
    Soon you will find the LED of your Arduino blinking

FirmateWebClient: a simple way to access sensors and actuators

Introduction

This project provides a minimum HTTP-based firmata controller for various hardware, typically Arduino. This extends user's control and monitoring of the hardware using platform-independant URL requests. Support list:

  • Digital Pins
  • Analog Pins
  • PWM
  • Servo
This is just a few of the many possibilities. We welcome you build, extend and experiment with the features you need.

Install and run the client

You should have the following items ready before beginning the process:
  • clone or Download this project files in the folder of your choice.

  • Install NodeJS. Make sure that version of NodeJS is greater than 4.0.

  • Open a new shell or Node.js command prompt and navigate to the folder where you placed the project files. Run the following commands to install johnny-five and serialport package.

npm install johnny-five
npm install serialport
  • Follow this tutorial to setup your arduino

  • Run the client using the following commands:

node FirmateWebClient.js

< h2 id="FirmateWebClient_ Usage">Usage Add these parameters to GET request to control the client, you can also see the following examples to learn how to use it.

Set digital pin
Write to a digital pin and set it to output mode
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/set_digital/13/1',//command/the digital pin to write to(0~13)/0 or 1
  method: 'GET'
};
Set PWM pin
Write to an analog pin using Pulse-width modulation (PWM)
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/set_pwm/3/255',//command/Analog output pin(3,4,6,9,10,11)/0(0V)~255(5V)
  method: 'GET'
};
Set servo pin
Write the angle to a specified pin and set it to servo mode
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/set_servo/3/255',//command/Servo output pin(0~13)/Angle from 0 to 180.
  method: 'GET'
};
Sweep servo
Sweep servo from 0-180 and repeat
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/sweep_servo/3',//command/Servo output pin(0~13)
  method: 'GET'
};
Stop servo
Stop a moving servo
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/stop_servo/3',//command/Servo output pin(0~13)
  method: 'GET'
};
Read all pins state
It allow you to read all pins state and will return you a json object
var url = {
  hostname: 'localhost',//your device ip
  port: 23456,//server port, default 23456
  path: '/read_all_pins',//command
  method: 'GET'
};
You will receive an object like this
{
    "command":["read_all_pins"],
    "data":{"0":"false",..."13":"false","A0":"0.75",..."A5":"0.67"}
}

Examples

You can see all the examples in /examples folder.
Turn on a LED
In this example, we will turn on the LED which has connected on digital pin 13.
  • Open a new shell or Node.js command prompt and navigate to /examples folder
  • Run the sample using the following commands: node set_digital.js
Set PWM
This example assigns a pulse width modulation (PWM) value to an output pin (D3, D5, D6, D9, D10, D11) to dim or brighten a LED. In this sample, we use the onboard LED which connects to digital pin 13.
  • Open a new shell or Node.js command prompt and navigate to /examples folder
  • Run the sample using the following commands: node set_pwm.js
Set Servo
In this example, we will set the servo motor to 20 degree.
  • Open a new shell or Node.js command prompt and navigate to /examples folder
  • Insert servo into pin D9
  • Run the sample using the following commands: node set_servo.js
Read Light Sensor Output
This example detect the value of a light sensor via analog pin(A0~A5)
  • Open a new shell or Node.js command prompt and navigate to /examples folder
  • Connect a Light Sensor to analog pin A0
  • Run the sample using the following commands: node read_analog.js
  • the value of the sensor will be printed out.
Click to see more user experience.

Project Examples

Turn a LattePanda in to a 3D Print Server Using Octoprint

OctoPrint is an open source software which is designed to manage 3D printers. It enables you to control and monitor a 3D printer remotely from any web browser just as if you were sitting in front of it, even if it’s on the other side of your house, in your garage, or on the other side of the world. In addition to this it can slice models by dragging and dropping .stl or .obj files on to the web UI and you can view print jobs in progress and create time lapses when you connect an ordinary USB webcam!
In this tutorial we will discuss how to control and monitor a 3D printer remotely using OctoPrint and LattePanda. What We Need
Before we begin you will need to prepare the following equipment:
  1. LattePanda
  2. A 3D printer (We have opted for the Overlord 3D Printer from DREAMMAKER)
What is the DREAMMAKER Overlord?
The DREAMMAKER Overlord is a 3D printer that is affordable, smart and stylish. It has many advantages such as:
  1. A fusion of oriental classic and minimalism design
  2. Up to 16 Pantone standard colors for your unique taste
  3. Optimized operation on Windows/Mac OS/Linux
  4. Auto calibration
  5. Industrial Delta armature that enables a high level of repeated accuracy
The following section will walk through how to install OctoPrint and connect your 3D printer Let’s get started:

Step 1: Install OctoPrint

To install OctoPrint follow the official tutorial:
Windows https://github.com/foosel/OctoPrint/wiki/Setup-on-Windows
In the tutorial you need to install Python 2.7 and Microsoft Visual C++ Compiler for Python 2.7 and then execute some command statements

Step 2: Start OctoPrint in a Web Browser

When you complete last step in the section 1, the command window will show some information as following figures show:
OctoPrint_IpAddress
In the lower right corner of the command window there are two URLs http://127.0.0.1:5000 and http://192.168.2.104:5000 They are highlighted with red rectangles in the image.
The first URL is your localhost URL. You may access the OctoPrint web UI on the PC connected to the Printer using this URL.
OctoPrint_openOctoPrint
The second URL is used to Connect to your 3D printer remotely from another PC on the same local Network as your LattePanda. The address 192.168.2.104 is actually your LattePanda's IP address. If the CMD window doesn't emerge the second URL, you can look for the IP address in Network and Sharing Center and attach the port number :5000 at the end of IP address.

Please Note:

  1. We recommend using Google Chrome as a browser. This has been tested in Microsoft Edge, and wasn't able to work without some further calibration.
  2. Do not close the command window when you attempt to open OctoPrint in your web browser, or you will see the following figure.
    OctoPrint_offline
  3. How to Start OctoPrint
    When we set up OctoPrint, there is no desktop icon or launcher. How can we open it when we need to use it? Just open the directory F:\OctoPrint\venv\Scripts and find the file octoprint.exe, double click it.
    Then the familiar command window will emerge where you can find the two URLs in the lower right corner. Input the URLs in to your web browser as before.

Step 3: Connect to your 3D Printer

Log in your account (create one if you don't have one) and click Settings. Select "Printer Profiles" to add your printer. Choose your printer name and set some parameters similar to the following:
OctoPrint_addProfile OctoPrint_addProfile2 Set the Serial Port and BaudRate as AUTO and select the Printer Profile "Overlord" that you created on the previous step
OctoPrint_connect When you connect to the Overlord successfully, you should see the following information. OctoPrint_succeed If Octoprint fails to connect try restarting your 3D printer, refresh the OctoPrint web interface or disconnect and reconnect the USB cable.

Step 4:How to Upload Files and Print

Open the OctoPrint Web interface and press the upload button in the lower left corner to upload a .gcode file. When the upload is complete, you can click the print button, then the printer will begin to print the file. You can monitor the print time elapsed, remaining print time, nozzle temperature and also pause or cancel a running job as the following figure shows: OctoPrint_printState You can now open OctoPrint on other computer or phone (connected to the same local Network as your LattePanda) and log in to monitor and control your printer remotely! Feel free to contact us if you have any queries. We will give advice as soon as we can.

References

  1. http://www.dfrobot.com.cn/community/thread-13090-1-1.html
  2. https://github.com/foosel/OctoPrint/wiki/Setup-on-Windows
  3. http://www.lattepanda.com/product-detail/?pid=2
  4. http://www.dreammaker.cc/

Face Detection using OpenCV

What is OpenCV
OpenCV (Open Source Computer Vision) is released under a BSD license and hence it’s free for both academic and commercial use. It has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational efficiency and with a strong focus on real-time applications. Written in optimized C/C++, the library can take advantage of multi-core processing.
Adopted all around the world, OpenCV has more than 47 thousand people of user community and estimated number of downloads exceeding 9 million. Usage ranges from interactive art, to mines detection, online maps and advanced robotics. Let’s get started:

Step 1:Install Visual Studio 2015 and OpenCV

  1. Install Visual Studio 2015 on your computer
    Head over to https://www.visualstudio.com/products/visual-studio-professional-with-msdn-vs and download Visual Studio Professional 2015. Unzip the downloaded file and double-click the 'vs_professional.exe', then the installation process will begin.
  2. Install OpenCV Head over to the site: http://www.opencv.org and download the latest version of OpenCV (shown in the following figure). Choose the version according to your operating system.
    In this tutorial we are going to install OpenCV 3.1 using Visual Studio 2015 professional on a 64-bit system running Windows 10.
    OpenCV_imageOpenCVDownload
    Extract the downloaded OpenCV file
    Double click the downloaded OpenCV file, and then extract it
    OpenCV_extractOpenCV

Step 2: Set the Environment Variables

  1. To do this step, open the Control Panel and then System. Click the Advanced System Settings, last Environment Variables in turns as show in the following figure.
    OpenCV_variables1
  2. Edit the PATH environment variables and Add a new environment variable, then give it the value of F:\opencv\build\x64\vc14\bin. Note that change the value depends on the path where you have extracted your OpenCV in step 2.
    OpenCV_variables2

Step 3: Create a new project in Visual Studio 2015

  1. In Visual Studio 2015, create a new project to follow the steps in turns as the following figure shows
    OpenCV_newProject1
  2. Select Win32 Console Application in Visual C++, then name your project and select a directory to store it
    OpenCV_newProject2
  3. Choose the empty project and click finish
    OpenCV_newProject3
  4. Add a new cpp file
    OpenCV_newProject4 OpenCV_newProject5

Step 4: Configure OpenCV in Visual Studio 2015

  1. Open the Property Manager and double click Debug|Win64
    OpenCV_property1
  2. Select "Include Directories", and give it the following values:
    F:\opencv\build\include
    F:\opencv\build\include\opencv
    F:\opencv\build\include\opencv2
    Remember that change the value depending on the path you have extracted your OpenCV files to in step 2.
    OpenCV_property2
  3. Add Library Directories, give the value ofF:\opencv\build\x64\vc14\lib. Remember that changing the values depends on the path where you have extracted your OpenCV in step 2
    OpenCV_property3
    1.Add additional dependences
    Copy the following item and paste it in additional Dependences blank opencv_world310d.lib
    OpenCV_property4

Step 5: Paste the following code to the .cpp file your added in step 4.

#include&lt;opencv2\objdetect\objdetect.hpp&gt;
#include&lt;opencv2\highgui\highgui.hpp&gt;
#include&lt;opencv2\imgproc\imgproc.hpp&gt;
#include&lt;iostream&gt;
#include&lt;stdio.h&gt;

using namespace std;
using namespace cv;

string harrEye = &quot;..\\..\\..\\resources\\harr\\haarcascade_eye_tree_eyeglasses.xml&quot;;
string harrFace = &quot;..\\..\\..\\resources\\harr\\haarcascade_frontalface_alt.xml&quot;;
CascadeClassifier faceCascade;
CascadeClassifier EyeCascade;
string windownName = &quot;Capture faces and eyes &quot;;
void detectAndDiapley(Mat frame);

int main()
{
    Mat frame;

    // load the cascades
    if (!EyeCascade.load(harrEye))
        cout &lt;&lt; &quot;load harrEye failed&quot; &lt;&lt; endl;
    if (!faceCascade.load(harrFace))
        cout &lt;&lt; &quot;load harrFace failed&quot; &lt;&lt; endl;

    // read the video stream
    VideoCapture capture(0);
    if (capture.isOpened())
    {
        while (true)
        {
            capture &gt;&gt; frame;

            // apply the cascaders to the frame
            if (!frame.empty())
            {
                detectAndDiapley(frame);
            }
            else
            {
                cout &lt;&lt; &quot;input video frame is empty&quot; &lt;&lt; endl;
            }
            if (waitKey(30) &gt;= 0)break;
        }
    }
    return 0;
}

void detectAndDiapley(Mat frame)
{
    vector&lt;Rect&gt; faces;
    Mat frameGray;
    cvtColor(frame, frameGray, CV_BGR2GRAY);
    equalizeHist(frameGray, frameGray);

    //Detect faces
    faceCascade.detectMultiScale(frameGray, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));
    for (int i = 0; i &lt; faces.size(); i++)
    {
        Point Vertex1(faces[i].x, faces[i].y);
        Point Vertex2(faces[i].x + faces[i].width, faces[i].y + faces[i].height);
        rectangle(frame, Vertex1, Vertex2, Scalar(0, 0, 255), 2, 8, 0);
        Mat faceROI = frameGray(faces[i]);
        vector&lt;Rect&gt; eyes;

        // detect eyes in each face
        EyeCascade.detectMultiScale(faceROI, eyes, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30));
        for (int j = 0; j &lt; eyes.size(); j++)
        {
            Point center(faces[i].x + eyes[j].x + eyes[j].width / 2, faces[i].y + eyes[j].y + eyes[j].height / 2);          
      int radius = cvRound((eyes[j].width + eyes[j].height)*0.25);
            Size axes(eyes[j].width / 2, 13);
            ellipse(frame, center, axes, 0, 0, 360, Scalar(255, 255, 0), 2, 8, 0);
        }
    }
    // show the faces and eyes detected
    imshow(windownName, frame);
}

Step 6: Debug your Project

Set two options as following figure shows:
OpenCV_SetMode
Press F5 to execute the face detection project, your PC camera will turn on and your face and eyes will be highlighted like so:
OpenCV_Lena

References:

  1. http://www.michaelpsyllakis.com/install-opencv-on-visual-studio-2015-community-tutorial/
  2. http://docs.opencv.org/2.4/opencv_tutorials.pdf
  3. http://docs.opencv.org/2.4/opencv2refman.pdf

Node-RED

Node-RED is a visual programming tool for Internet of Things. IBM is actively bringing its latest functions, including Waston and IOT service, into the toolbox ever since its acquisition.
Here we are taking the advantage of the Node-RED tool and the email service to build a simple but awesome IOT control unit. You can remotely control your Arduino board by sending an email to your own account. The process roughly takes half an hour, with minimum coding required.

Hardware list

  • LattePanda

Software setup

  1. Flash Firmata into Your Uno Board
  2. Install Node-RED.
  3. Please follow the official Arduino documentation from Node-RED.
    As soon as you get past the first blinking example, you can start to go to the IOT part.
  4. Build Control flow
    Here is the simple flow setup.
    node-red_flow
  5. Configure Email Node
    Now we can configure the email node. I am using the Microsoft office email server. If you are using other
    email service providers, please check your server settings for setting up an imap client.
    node-red_email
    And also if you are using Gmail, you need to create an application specific password for third-party application authentication.
  6. Configure Function Node We need a tiny bit of code to interpret the email messages before relay that on to your Arduino board. Specifically, we are using the email's subject to control our Arduino board. Because some server may automatically attach or transform the email body content or format for better user experience (in its own opinion), it would be easier to write working code for our example using only the email subject.
    Here is the code
    javascript
    msg.payload = parseInt(msg.topic);
    return msg;
    node-red_function
  7. Configure the Arduino LED Node You should have configured the LED node on pin 13 already if you have passed the example. But here is a screenshot just in case.
    node-red_pin

Test

Now you can send an email to your account, with the subject of a single digit: 1( or 0 if your pin 13 LED is already turned on). You should see the LED on the board change after about 10 or 20 seconds after you have sent the email. You can leave the email body empty, we are not going to use that part for now. However you can choose to try more tricks with the email body once you feel more confident.

How It Works

According to Node-RED documentation, the email node will try to get your latest email from the given mail folder between the given time interval. It will notice any new email, and pass on email information to our logical function. Then our function tries to interpret the subject to an integer and fill in the data our Arduino output pin needs. Finally the Arduino pin node controls the board using firmata protocol and changes the LED status.

Run a simple Azure IoT Hub sample on LattePanda

About this document This tutorial is adapted from link . The functions have been adapted for LattePanda. This samples uses Node.JS, click for more language platforms and further tutorials. What’s Azure IoT Hub Microsoft Azure is a cloud computing platform and infrastructure created by Microsoft for building, deploying, and managing applications and services through a global network of Microsoft-managed data centers. Azure IoT Hub is a fully managed service that enables reliable and secure bi-directional communications between millions of IoT devices and an application back end. Azure IoT Hub offers reliable device-to-cloud and cloud-to-device hyper-scale messaging, enables secure communications using per-device security credentials and access control, and includes device libraries for the most popular languages and platforms.

Introduction

This document describes how to build and run the Azure IoT Hub application on your LattePanda.
This multi-step process includes:
  • Prepare your development environment
  • Configuring Azure IoT Hub
  • Registering your IoT device
  • Build and deploy Azure IoT SDK on device
  • Run the Sample and send data to Azure IoT Hub.

2 Steps to run Azure IoT Hub application on your LattePanda.

Step 1: Prerequisites

You should have the following items ready before beginning the process:

Step 2: Build and Run the sample

  • Get the following sample files from https://github.com/azure/azure-iot-sdk-node
    • package.json
    • simple_sample_device.js
  • Place the files in the folder of your choice on the target machine/device
  • Open the file simple_sample_device.js in a text editor.
  • Locate the following code in the file:
    var connectionString = '[IoT Device Connection String]';
    
  • Replace [IoT Device Connection String] with the connection string for your device. Save the changes.
  • From the shell or command prompt you used earlier to run the iothub-explorer utility, use the following command to receive device-to-cloud messages from the sample application (Substitute [iot hub connection string] with the IoT Hub connection string you previously copied):
    iothub-explorer login "[iot hub connection string]"
    
  • Create a new device identity called myDeviceId with the command:
    iothub-explorer create myDeviceId --connection-string
    
  • Open a new shell or Node.js command prompt and navigate to the folder where you placed the sample files. Run the sample application using the following commands:
    npm install
    node simple_sample_device.js
    
  • The sample application will send messages to your IoT hub, and the iothub-explorer utility will display the messages as your IoT hub receives them.

Prepare your development environment

This document describes how to prepare your development environment to use the Microsoft Azure IoT SDK for Node.js.

Setup your development environment

Complete the following steps to set up your development environment:
  • Ensure that Node.js version 0.12.x or later is installed. Run node --version at the command line to check the version.
  • installed Node.js,
  • clone azure-iot-sdks to your development machine or device. You should always use the master branch for the latest version of the libraries and samples.
  • Open the Node.js command prompt and navigate to the node folder in your local copy of this repository (azure-iot-sdks). Run the build\dev-setup.cmd script to prepare your development environment.

Set up IoT Hub

Before you can communicate with IoT Hub from a device you must create an IoT hub instance in your Azure subscription and then provision your device in your IoT hub.

Create an IoT hub

You can use the Azure Portal to create an IoT hub to use with your devices.
  1. Log on to the Azure Portal.
  2. In the jumpbar, click New, then click Internet of Things, and then click Azure IoT Hub.
    create-iot-hub1
  3. In the New IoT Hub blade, specify the desired configuration for the IoT Hub.
    create-iot-hub2
    • In the Name box, enter a name to identify your IoT hub. When the Name is validated, a green check mark appears in the Name box.
    • Change the Pricing and scale tier as desired. The getting started samples do not require a specific tier.
    • In the Resource group box, create a new resource group, or select and existing one. For more information, see Using resource groups to manage your Azure resources.
    • Use Location to specify the geographic location in which to host your IoT hub.
  4. Once the new IoT hub options are configured, click Create. It can take a few minutes for the IoT hub to be created. To check the status, you can monitor the progress on the Startboard. Or, you can monitor your progress from the Notifications section.
    create-iot-hub3
  5. After the IoT hub has been created successfully, open the blade of the new IoT hub, take note of the hostname URI, and click Shared access policies.
    create-iot-hub4
  6. Select the Shared access policy called iothubowner, then copy and take note of the connection string on the right blade. create-iot-hub5
Your IoT hub is now created, and you have the connection string you need to use the iothub-explorer or the Device Explorer tool. This connection string enables applications to perform management operations on the IoT hub such as adding a new device to the IoT hub.

Manage IoT Hub

Before a device can communicate with IoT Hub, you must add details of that device to the IoT Hub device identity registry. When you add a device to your IoT Hub device identity registry, the hub generates the connection string that the device must use when it establishes its secure connection to your hub. You can also use the device identity registry to disable a device and prevent it from connecting to your hub. To add devices to your IoT hub and manage those devices, you can use either of: Use either of these tools to generate a device-specific connection string that you can copy and paste in the source code of the application running on your device. Both tools are available in this repository.
  • Note: While IoT Hub supports multiple authentication schemes for devices, both these tools generate a pre-shared key to use for authentication.
  • Note: You must have an IoT hub running in Azure before you can provision your device. The document Set up IoT Hub describes how to set up an IoT hub.
You can also use both of these tools to monitor the messages that your device sends to an IoT hub and send commands to you your devices from IoT Hub.

Use the iothub-explorer tool to provision a device

The iothub-explorer tool is a cross-platform, command-line tool (written in Node.js) for managing your devices in IoT hub. You will need to pre-install Node.js for your platform including npm package manager from nodejs.org To install this tool in your environment, run the following command in a terminal/shell window on your machine: npm install -g iothub-explorer See Install iothub-explorer for more information. To provision a new device:
  1. Get the connection string for your IoT hub. See Set up IoT Hub for more details.
  2. Run the following command to register your device with your IoT hub. When you run the command, replace [iothub connection string] with the IoT Hub connection string from the previous step and replace myDeviceId with a name for your device such as mydevice.
    iothub-explorer login "[iothub connection string]"
    iothub-explorer create myDeviceId --connection-string
    
You should see a response like this: Created device mydevice - ... - connectionString: HostName=<hostname>;DeviceId=mydevice;SharedAccessKey=<device-key> Copy the device connection string information for later use. The samples in this repository use connection strings in the format: HostName=<iothub-name>.azure-devices.net;DeviceId=<device-name>;SharedAccessKey=<device-key>. To get help on using the iothub-explorer tool to perform other tasks such as listing devices, deleting devices, and sending commands to devices, enter the following command: iothub-explorer --help For further information about using the iothub-explorer tool to perform tasks such as disabling a device, monitoring a device, and sending commands to a device see:

Send light sensor data to Azure storage

About this document
This tutorial is adapted from link . The functions have been adapted for LattePanda. This samples uses Node.JS, click for more language platforms and further tutorials. What’s Azure Storage
Azure Storage is the cloud storage solution for modern applications that rely on durability, availability, and scalability to meet the needs of their customers. Azure Storage is massively scalable, so you can store and process hundreds of terabytes of data to support the big data scenarios required by scientific, financial analysis, and media applications. Or you can store the small amounts of data required for a small business website.

Introduction

This sample shows how to send data from a light sensor to Azure storage using a Node.JS app. This multi-step process includes:
  • Prepare your development environment
  • Configuring Azure Storage
  • Run the Sample and send light sensor data to Azure Storage.

2 Steps to run Azure IoT Hub application on your LattePanda.

Step 1: Prerequisites

You should have the following items ready before beginning the process:

Step 2: Set up the hardware

  • Insert Light Sensor into LattePanda analog pin A0, The final setup should look something like this: BFC275558BF698A5C21E19A4E3A240D7_meitu_1

Step 3: Build and Run the sample

  • Creat a app.js file and copy the following code into it. be sure to enter valid values for accountName accountKey and arduinoPort. You may also change tableName. Place the file in the folder of your choice on your LattePanda
    var azure = require('azure-storage');
    var five = require('johnny-five');
    
    var accountName = ''; // Enter your Azure storage account name
    var accountKey = ''; // Enter your Azure storage account key
    var tableName = 'MyLightSensorData'; // Name of your table to store the light sensor data
    
    var arduinoPort = 'COM3';// Enter your Arduino Port
    
    var tableService = azure.createTableService(accountName, accountKey);
    
    if (CreateTable()) {
    InitializeBoard();
    }
    
    // Create a table in Azure storage
    function CreateTable() {
    tableService.createTableIfNotExists(tableName, function (error, result, response) {
      if (error) {
        console.log(error);
        return false;
      }
    });
    return true;
    }
    
    // Initialize the Arduino board with Johnny-Five
    function InitializeBoard() {
    var board = new five.Board({ port: arduinoPort });
    
    board.on('ready', function () {
      lightSensor = new five.Sensor({
        pin: "A0",
        freq: 10000 // 10 seconds
      });
    
      lightSensor.on('change', function () {
        InsertValue(this.value);
      });
    });
    }
    
    function InsertValue(value) {
    console.log('Value to insert: ' + value);
    
    // Create entity to store in the table with the value
    // of the light sensor and the date.
    var entGen = azure.TableUtilities.entityGenerator;
    var entity = {
      PartitionKey: entGen.String('Light'),
      RowKey: entGen.String(String(Date.now())),
      intValue: entGen.Int32(value),
      dateValue: entGen.DateTime(new Date().toISOString()),
    };
    
    // Insert the entity in the Azure storage table
    tableService.insertEntity(tableName, entity, function (error, result, response) {
      if (error) {
        console.log(error);
      }
    });
    }
    
  • Open a new shell or Node.js command prompt and navigate to the folder where you placed the sample files. install azure , serialport and johnny-five libraries using the following commands:
    npm install azure
    npm install johnny-five
    npm install serialport
    
  • Run the sample application using the following commands, Every 10 seconds, the code will send the value of the light sensor to the table specified. Make sure that StandardFirmataPlus has already uploaded on the board.
    node app.js
    
  • You can then view the data being sent to Azure storage with Power BI. In Power BI, click on the Get Data button, select ‘Microsoft Azure Table Storage’ as your source, then follow the steps to connect. Once connected you can select your table and view the light sensor data that has been sent from your LattePanda. azure-storagedata

Source:

[1] Azure data uploader

Troubleshooting & FAQs

How do I know LattePanda is on?

There is one LED under LattePanda. When LP is on, you should see the PWR LED light up continuous and bright.

How do I re-install LattePanda Windows system?

A simple solution is useful for the following situation:
  1. You can't startup your Windows system properly
  2. Windows system crashes
  3. You need to recover the default Windows system after installing Android or Linux.
Device required: 1 x USB flash Drive (at least 5GB for LattePanda Standard and 8GB for LattePanda Enhanced)
Please follow the steps below to re-install Windows 10 to its "out of the box" state.
  1. Download your LattePanda's official Windows 10 image
z8350 mark
x86 version for z8300 2GB+32GB
x64 version for z8300 4GB+64GB
x86 version for CR110 z8350 2GB+32GB
x64 version for CR110 z8350 4GB+64GB/ all CR200 z8350
  1. Format your USB disk to FAT32 and change the drive name to "WINPE"
  2. Unzip the image to root directory of your USB flash disk
  3. Plug the USB disk in USB host
  4. Power on the LattePanda
  5. The system will install the image automatically. Just wait until the recovery is finished. Please note: Your USB disk must be formatted to FAT32 and labelled "WINPE" in order for this to work
  6. Unplug the USB disk. Reboot and enjoy.

How to install Windows Enterprise on LattePanda?

We announced the LattePanda 4G/64GB version with Windows Key. If you need to know how to install a Windows Enterprise system on LattePanda or want know how to activate Windows key on your board, just check this simple tutorial contributed by community member.

What Boot Method Does LattePanda Use?

  1. LattePanda BIOS uses UEFI boot
  2. As we use different Windows images for two LP versions, the BIOS's bit depth should match the image. So LattePanda 2G/32GB uses a 32bit UEFI boot and 4G/64GB uses a 64bit UEFI boot.
If you are trying to install a different OS such as Linux, we have had some luck using multiarch images. We are still experimenting with this. We recommend looking on the forum for more information.

Common Adapters and USB cable recommendations:

Good power supply can ensure stable work of lattepanda. If you can’t start it, experience automatic shutdown and other problems in the process of using lattepanda, please check your adapter and USB cable so that whether they reach the specified requirements.

We tested some common adapter and USB cable so that it is convenient for your selection. The results are shown in the table below.

Adapter:

Model: AUKEY PA-T9 (American Standard)
Test Results: available
Peak current: 3.0A
link: Amazon Model: AUKEY PA-T9-DE (European Standard)
Test Results: available
Peak current: 3.0A
link: Amazon Model: NILLKIN [email protected] USB Adapter
Test Results: available
Peak current: 2.5A
link: DFRobot, Amazon Model: APPLE ipad 10W usb power adapter
Test Results: available
Peak current: 2.8A
link: Amazon Model: JDB 5500
Test Results: available
Peak current: 2.8A
link: Amazon Model: HUAWEI HW-050200C3W
Test Results: available
Peak current: 2.5A
link: Amazon Model: HUAWEI HW-059200CHQ
Test Results: unavailable

USB cable:

Model: LattePanda Double Sided Micro USB Cable
Test Results: available
Wire Diameter: 0.9mm
link: DFRobot Model: REMAX RC-025T
Test Results: available
Wire Diameter: 0.8mm
link: Amazon Model: JDB 5500
Test Results: available
Wire Diameter: 0.7mm
link: Amazon

Other

Specific to embedded and robot applications scenarios, lattepanda also provides two pairs of external power supply pin of 5v and Gnd, check pinout diagram to find the external power connector beside the MicroUSB connector.