Product Rview of the LattePanda 3 Delta Single Board Computer

Table of contents

RoadTest: LattePanda 3 Delta

Author: redcharly

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: I haven't used nothing like LattePanda 3 Delta before. Really powerful and versatile SBC.

What were the biggest problems encountered?: I have used this board in school and many of my students have worked with it. It has become almost impossible to meet the timing of a normal roadtest!

Detailed Review:

Introduction

This roadtest was created by bringing together some of the works that some of my students have created using the LattePanda3 Delta SBC. We have been working with single board computers like Raspberry but LattePanda is a board with very different characteristics.

It approaches the performance of a mid-range notebook and this performance allows you to install  Windows 10 operating system.

My work plan for this roadtest was to find some useful applications for school activities. I gave my students maximum freedom and everyone was able to develop the applications that he thought were most useful on the board. Below we will look at some simple applications that my students have devised and put into practice on the LattePanda3 Delta.

I have to apologize for the delay in publishing this roadtest but the activities were carried out autonomously by the students who had to work on this project in their limited spare time. I am very happy that they achieved their results using only the datasheets and their computer skills.

Unboxing

From the first time I saw this very powerful and at the same time aesthetically beautiful board, I was curious to touch it and use it. At startup, the LattePanda3 Delta  immediately showed considerable potential.
The board, presented in a class, aroused much curiosity and the enthusiastic reaction of many students.

Here are some of the applications my students have made

  1. Working with Arduino (Andrea Leone)
  2. FTP server (Andrea Russo)
  3. Minecraft servers (Gioele Vicario - Andrea Russo)
  4. Video-streaming server (Gioele Vicario)
  5. Firewall using pfSense.

1. Working with LattePanda 3 Delta and Arduino (Andrea Leone)

A Pocket-sized Hackable Computer

The Latte Panda Delta 3 is a SBC (Single Board Computer) able to run heavy operations and also having a high expandability with 42 interfaces. In the back we can find 2 M.2 slots PCIe 3.0, an eDP with a touch interface for touchscreen displays, wireless antennas for WiFi and Bluetooth and a built-in TF-SIM reader for both mobile data or storage. 

image

Back view of the

While in the front of the board we can find 3 USB ports 3.2 gen1 except one being gen2, a Gigabit Ethernet port, an HDMI 2.0, an headphone Jack and an USB Type C that can be used as a DisplayPort 1.4 other than just power. In the middle of the Board, under the cooling fan there is the Intel Celeron N5105 with 8GB of RAM and 64GB eMMC storage. On the sides we can find the most interesting feature of the Lattepanda, the I/O pins for general purpose, with I2C, RS232, USB 2.0, Audio and a built-in Arduino board.  

image

Front view of the Lattepanda

My project

I wanted to be able to detect when there is a blackout in my house and use the lattepanda to send a notification to my phone and shutdown my computer or anything else.

To do so, I took my UPS and I soldered two wires to the LED that turns on when the UPS is taking power from the power grid, and turns off when there is no incoming power.

 

The LED connection

The code

To make it easy, I decided to compile in the Arduino this script so I could use Python to code the snippet for reading the value from the analog0 pin, and in case of a state change I could use the Python’s socket library to send a message to my phone. 

import threading
import pyfirmata.util
import time
from win10toast import ToastNotifier
import socket


class ClientThread:
  def __init__(self, queue):
      # initialize the server
      self.queue = queue
      self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      self.server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
      self.host = socket.gethostname()
      self.port = 8080
      self.connected = False
      self.thread = threading.Thread(target=self.initialize)
      self.rcvthread = threading.Thread(target=self.getdata)

  def initialize(self):
      # start the server and listen for connections
      self.server.bind((self.host, self.port))
      self.server.listen(1)
      self.clientsock, self.clientAddress = self.server.accept()

      # if a connection is established
      self.data = self.clientsock.recv(2048)
      self.msg = self.data.decode().strip()
      print("Incoming connection :", self.msg)

      # check if the connection is valid
      if self.msg == 'connect':

          # if the connection is valid, send a message to the client
          self.rcvthread.start()
          print("connection established")
          self.connected = True
          self.queue.append("Connected\n")
          self.run()
      else:
          # if the connection is not valid, close the connection and wait for a new one
          self.reconnect()

  def run(self):

      while True:
          # if we have a message in the queue, send it to the client
          if self.queue:
              try:
                  self.clientsock.send(bytes(self.queue.pop(0), 'UTF-8'))
              except:
                  # if the connection is lost, reconnect
                  self.reconnect()
          time.sleep(0.5)

  def reconnect(self):
      # close the connection and wait for a new one
      print("connection lost")
      self.connected = False
      self.clientsock.close()
      self.clientsock, self.clientAddress = self.server.accept()
     
      self.data = self.clientsock.recv(2048)
      if self.data:
          self.msg = self.data.decode().strip()
          print("Incoming connection :", self.msg)
          if self.msg == 'connect':
              self.connected = True
              self.run()
          else:
              self.reconnect()
      else:
          self.reconnect()

  def getdata(self):
      # get data from the client (not used in this project)
      while True:
          self.data = self.clientsock.recv(2048)
          if self.data:
              print("Incoming communication :", self.data.decode())
          time.sleep(0.5)


def main():
  # initialize the board
  board = pyfirmata.Arduino('COM6')
  it = pyfirmata.util.Iterator(board)
  it.start()

  # initialize all the pins and variables
  board.digital[12].mode = pyfirmata.INPUT
  toast = ToastNotifier()
  analog_input = board.get_pin('a:1:i')
  check = True
  status = True
  value = 1
  board.digital[13].write(1)
  ctime = time.time()
  debug = False

  # initialize the queue and the thread for the socket
  queue = []
  thread = ClientThread(queue)
  thread.thread.start()
  print("Server started")
 
  if debug:
      value = 0.8

  while True:
      # for debugging purposes
      if ctime + 5 < time.time() and debug:
          if value > 0.7:
              ctime = time.time()
              value = 0.0
          else:
              ctime = time.time()
              value = 0.8
      else:
          # read the value from the analog pin
          value = analog_input.read()
          if value is None:
              time.sleep(0.1)
              continue

      # check if there is a voltage on the pin
      if value > 0.7:
          # check if we recorded a change of state in the last iteration
          if check:
              # if we did, we wait half a second from the detection of the change of state
              if ctime + 0.5 < time.time():
                  # if we didn't record a change of state in the last iterations'
                  if status:
                      # means that we are in a stable high state
                      print("ON")
                      # if we have a connection, we send the message
                      if thread.connected:
                          queue.append("The power grid is back ON\n")
                      else:
                          print("Not connected")
                      # change the state of the build-in led to on  
                      board.digital[13].write(1)
                      # send a desktop notification
                      toast.show_toast(
                          "POWER WARNING",
                          "The power grid is back on",
                          duration=20,
                          icon_path="icon.ico",
                          threaded=True,
                      )
                      # we don't need to check for a change of state anymore
                      check = False
                  else:
                      # if the state was off, we update the state and do another check
                      # (this is a double check to make sure the state is stable)
                      status = True

          # if we are currently in low state and a high voltage is detected, we trigger the check
          elif not status:
              # time of the last detection of state change
              # (it is the same for the low check)
              ctime = time.time()
              check = True
              status = True

      # if the voltage is low
      elif value < 0.3:
          # check if we recorded a change of state in the last iteration
          if check:
              # if we did, we wait half a second from the detection of the change of state
              if ctime + 0.5 < time.time():
                  # if we didn't record a change of state in the last iterations'
                  if not status:
                      # means that we are in a stable low state
                      print("OFF")
                      # if we have a connection, we send the message
                      if thread.connected:
                          queue.append("The power grid is DOWN\n")
                      else:
                          print("Not connected")
                      # change the state of the build-in led to off
                      board.digital[13].write(0)
                      # send a desktop notification
                      toast.show_toast(
                          "POWER WARNING",
                          "The power grid is down",
                          duration=20,
                          icon_path="icon.ico",
                          threaded=True,
                      )
                      # we don't need to check for a change of state anymore
                      check = False
                  else:
                      # if the state was on, we update the state and do another check
                      # (this is a double check to make sure the state is stable)
                      status = False
          elif status:
              # if we are currently in a high state and a low voltage is detected, we trigger the check
              ctime = time.time()
              check = True
              status = False
      time.sleep(0.5)


if __name__ == "__main__":
  main()

Python code to detect the value and send the state of change of the powergrid

I created a simple app for my phone using MIT App inventor with a TCP plugin, and was impressed with the results. Although the TCP communication wasn't as fast as I hoped, it was still functional for its intended purpose. If I could go back I would have used flutter Instead, but it was good enough for its purpose.



The final result

The Latte Panda Delta 3 has proven to be a highly versatile and hackable computer that has no limits to its potential. The only limit is your imagination, and I'm excited to see what other projects people can come up with using this little device. Check out my demonstration video to see my project in action.

 

2. FTP server using LattePanda (Andrea Russo)

We will use LattePanda 3 Delta to create an FTP server and we will test its performances. 

The board is powered using its USB-C power supply and we have connected a monitor using HDMI cable and USB keyboard and mouse.

image

image

Now we log in to the system.

image

FTP Server installation and configuration

Now let's proceed with the installation of the software that we will use to create our FTP server.

We decided to use the "FileZilla Server" software. FileZilla server is a free and open source cross-platform FTP application and is available for Windows and Linux. It also supports FTP and FTPS (FTP over SSL/TLS).

image

Setting up the Filezilla FTP server is very simple and it takes just a few minutes to set up a working FTP server.

image

First we created the folder that will contain the files and folders associated with the server users.

image


Next we need to create users and groups and configure the accounts that will allow clients to use the FTP server services.
Finally we need to set the permissions to read and write the files.
Once the configuration is finished, we confirm all the changes and exit the configuration, so our FTP server will be ready for use. 

image

image

For the test phase, which will be the most important part of our work, we will use Linux ISOs that will be downloaded and uploaded by several users connected at the same time to evaluate the behavior of the server and the board as the load varies. The tests are done in a computer lab of our school.

image

The test

The LattePanda 3 Delta SBC has fully passed the test and performed the service as an FTP server without any problems, neither in terms of configuration nor performance.

2 Minecraft Server (Gioele Vicario and Andrea Russo)

This little SBC can be used also for some entertainment thing, like host a Minecraft Server (if you are concerned about performance, at the bottom of the article there will be screenshots that could clarify your doubts)

It’s more simple than it seems, you only need:

  1. Windows installed
  2. Java version 18
  3. A good internet connection
  4. Obviously the Lattepanda 3 Delta board

 

So first of all we need to download the .jar file that we will use to start the server. It can be downloaded on Minecraft's official site. Here is the link to the direct download, or you can go to Minecraft’s official site, and click on the highlighted link.



You can download the file everywhere, in this example the file will stay on the Downloads folder

 After you’ve downloaded the file, you’ll have to open a terminal in windows, in this way:

  • Press the Windows Start button at the bottom left.
  • Type in "Command Prompt".
  • Right click on Command Prompt and click "Run as administrator".
  • Click Yes if the Windows 10 User Account Control prompt is displayed.
  • The Command Prompt should appear.

 

Then you’ll have to copy these line of code and paste them into the terminal:

cd Downloads/ && java -Xmx1024M -Xms1024M -jar minecraft_server..jar

 

Now the minecraft server is initialized, all you have to do is join the server!

To do this, you will obviously have to start Minecraft in another computer with the latest version.

At the moment that this article is written the latest version is 1.19.3.

 

When Minecraft will open you can go yo:

Multiplayer>Add Server>Server name:{the name you’ll choose}, Server address:  {LATTEPANDA_IP:PORT}

 

Now that everything is done you can play Minecraft with your friends using the Lattepanda board!



All of the things described above were done in class, in fact, thanks to the school’s network,  the connection to the local server was flawless and it could have connected up to 6 players at a time.

The students were even able to bring the server to the limit, with a whopping 100% of CPU usage and up to 75% of RAM usage!)




 

The LattePanda 3 Delta SBC also fully passed this test, the game display is fluid and many students were able to play at the same time without any problems.

Conclusions

These are the projects made by my students so far but we are preparing other uses that could be very interesting for this SBC.
Since I teach networks, I'd like my students to build a firewall or an IDS to practice many of the things related to network security seen in our course.


Finally, we are already working on using LattePanda 3 Delta as a multimedia server for the stream of video lessons and educational video in activities outside the laboratories. 

In fact, it would be fantastic to create outdoor lessons using LattePanda 3 Delta as a server for educational content.

Anonymous