Posts

Forward serial data between virtual serial ports in Node.js using socat

Image
I'm sharing this with you because I have faced some difficulties when I try to get data from virtual serial ports to my backend in the project . It's easy Part 1 . Installation: Download the tty0tty package from one of these sources: http://sourceforge.net/projects/tty0tty/files/ clone the repo  https://github.com/freemed/tty0tty git clone https://github.com/freemed/tty0tty Extract it tar xf tty0tty-1.2.tgz Build the kernel module from the provided source cd tty0tty-1.2/module make Copy the new kernel module into the kernel modules directory sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/ Load the module sudo depmod sudo modprobe tty0tty You should see new serial ports in /dev/ ( ls /dev/tnt* ) Give appropriate permissions to the new serial ports sudo chmod 666 /dev/tnt* You can now access the serial ports as  /dev/tnt0  (1,2,3,4 etc) Note that the consecutive ports are interconnected. For example, /dev/tnt0...

Combining Artificial intelligence, machine learning & deep learning to Embedded systems

Image
With this series now we are moving some another path of Embedded Systems. So what you can think of deep learning, machine learning, and artificial intelligence. I'm sure you have followed some courses, books, articles regarding this subject. Me too followed these courses to learn this subject. We have followed a lot of mathematics modules and stuff with this subject. So, I would like to share my experience of applying deep learning frameworks to our daily embedded systems applications. That's why I started this tutorial series. Hardware? I thought about running a neural network to detect plant behavior using raspberry pi once :-).I tried it with my raspberry pi and totally lagged. Raspberry PI has an ARM processor consist of few cores optimized for sequential serial processing. This will not enough for real-time processing. A CPU consists of a few cores optimized for sequential serial processing - See more at: http://www.nvidia.com/object/what-is-gpu-computin...

Jetson TX1 Embedded Systems Module For projects

Image
This is credit card size small form-factor Linux system-on-module, destined for demanding embedded applications in visual computing. We are using this board for the applications of our embedded systems because it offers enormous GPU processing in a tiny computer that only consumes 5-20 watts of power. Aside from the GPU, the CPU is certainly not slow with four 64-bit A57 ARM cores. And, you have 4GB of RAM and 16GB of eMMC storage, so you should be able to load your application onto the onboard storage and throw around big chunks of data in RAM. The SATA interface gave a great performance when paired to an SSD, and the two antenna 802.11ac gave speeds up to Gigabit Ethernet over the air. Specifications

Node.js how to work with Serial ports and display data on a beautiful frontend using Highcharts API Part 2

Image
Now you have some basic idea of the technologies we are using here. So let's get our hands dirty. First, we have to set up the Node js libraries correctly to handle the serial data and open a WebSocket. So simple what we here going to do is getting data from USB and put them into a GUI to visualize our data nicely. So for this tutorial, I'm going to use Arduino as my data source. Piratically this will be your sensor or devices which you are using. Here http://www.highcharts.com/  Highcharts makes it easy for developers to set up interactive charts in their web pages. This has good community support and this is best for our works. 1. First step clone this repository https://github.com/akilawickey/nodejs-serial-frontend/tree/master Here is the Arduino sketch sample.ino which I'm using to emulate data which you can find inside the repository 1: /* 2: * This code will emulate USB data 3: * 4: * 5: */ 6: // the setup function run...

Node.js how to work with Serial ports and display data on a beautiful frontend using Highcharts API Part 1

Image
Today I like to share something with how to use our embedded systems and web technologies. Our visualizing part is so important because thats how end users see our embedded systems real output. So there is no point if we cannot show our embedded system output to the users in a nice way. If you are not familiar with Node.js don't worry just do some googling and run a Hello World you will be fine. :-) http://nodeguide.com/beginner.html Our final goal is to display our sensor data in a front end like this Node.js is an Event-driven I/O server-side JavaScript environment based on V8. Includes API documentation, change-log, examples, and announcements. So by using this technology, we can do a lot of things.  You don't need to worry much about coding because developers have been developed this amazing environment to use in various sides and areas. As an example if you need some coding GUI building it has a library called express, if to you want to do a text to spee...

Let's Learn NodeMCU(EPS8266MOD) very popular IoT component

Image
NodeMCU SETUP GUIDE WITH ARDUINO These days IoT applications are so popular. And I think you have seen my previous posts about IoT Greenhouse. There I tried to pull out many concepts about IoT Technology. http://akilacollection.blogspot.com/2016/05/iot-greenhouse-project-part-3.html   There we have used some cost methods for IoT client Eg (Arduino Uno + Wifi Shield). But using this NodeMCU model you can reduce your cost much and this is low power consumption and integrated networking to the module  So let's learn about this. The ESP8266 WiFi Module is a self-contained SOC with integrated TCP/IP protocol stack that can give any microcontroller access to your WiFi network. The ESP8266 is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor. Each ESP8266 module comes pre-programmed with an AT command set firmware, meaning, you can simply hook this up to your Arduino device and get about as m...

Guide to IoT protocols

Image
Follow are the popular IoT protocols these days 1. MQTT 2.  CoAP Introduction for MQTT and example Nowadays we hear a lot about MQTT with IoT based projects. Let's see actually what is MQTT with simple examples in your Pc and later you can use them for your future IoT projects. MQTT is a publish/subscribe protocol that allows edge-of-network devices to publish to a broker. Clients connect to this broker, which then mediates communication between the two devices. Each device can subscribe, or register, to particular topics. When another client publishes a message on a subscribed topic, the broker forwards the message to any client that has subscribed. Hey let's make the idea so simple As an example imagine you have a plant. You put 3 sensors to it temperature sensor, humidity sensor, light intensity sensor So you need to get these sensor data to your application. Let's use the MQTT protocol to this scenario. He...