วันอังคารที่ 5 ธันวาคม พ.ศ. 2560

Raspberry Pi vs Asus Tinker Board



Raspberry Pi vs Asus Tinker Board

The Raspberry Pi has a competitor by Asus Tinker Board.

Asus Tinker board is a powerful board highly compatible with current solution and peripherals available in the market and it combines low power consumption with high performance platform.
Asus Tinker board has a quad-core 1.8GHz Rockchip processor, compared to the quad-core 1.2GHz Broadcom processor in the Raspberry Pi 3. It also has 2GB of memory, double that of the Pi 3.

One online benchmark claims the Tinker Board is almost two times faster than the Pi 3 in Geekbench, with Asus’ offering racking up a score of 3925 compared to the Pi’s 2092, as well as being faster when reading from and writing to storage.

While the Pi 3’s processor is based on a 64-bit architecture, compared to the 32-bit based architecture in the Tinker Board, the Tinker Board’s ARM Cortex A17-based chipset has been shown to outperform the Pi 3’s ARM Cortex A53-based chipset in certain tests.
Asus’ offering provides an alternative to Pi users while they wait for a performance upgrade, as the Pi’s co-creator Eben Upton has warned it will likely be at least 2018 before a new Raspberry Pi board is released. He also cautioned against expecting the Pi 3 to get a memory bump in the near future.

The Tinker Board also outstrips the Pi’s specs by supporting 4k video, Gigabit Ethernet and 192kHz/24-bit audio.


Comparison



Raspberry Pi 3 Model B ASUS Tinker Board
Product Launch 2016 Feb 2017 Jan
Broadcom BCM2837 Rockchip RK3288 
CPU Cortex-A53 Cortex-A17
ARMv8 Quad-Core 1.2 GHz ARMv7 Quad-Core 1.8 GHz
RAM 1 GB LPDDR2 2 GB LPDDR3
GPU Broadcom Video IV 400 MHz  Mali T764 600 MHz
Display HDMI , HD resolution HDMI , H.264 4K decode capability
WiFi 802.11b/g/n  802.11b/g/n , swappable antenna
NIC 100 M LAN Gb LAN
Bluetooth 4.1 LE 4.0 EDR
SDIO 2.0 3.0
Official OS Linux - Debian Linux - Debian / KODI
Prices ( amazon )
34.5 USD.
54.99 USD.

Benchmark



Reference 

วันเสาร์ที่ 2 ธันวาคม พ.ศ. 2560

Raspberry Pi IoT Performance Monitor with ThingSpeak




Raspberry Pi IoT Performance Monitor with ThingSpeak

This project you can monitor raspberry pi or other embedded linux or Single Board Computer ( SBC ) such as CPU Temperature , CPU %,Memory and Disk Usage on ThingSpeak Cloud IoT service.
Code is python.

System Diagram






What is ThingSpeak.com?

ThingSpeak  is an Internet of Things (IoT) platform that lets you collect and store sensor data in the cloud and develop IoT applications. The ThingSpeak™ IoT platform provides apps that let you analyze and visualize your data in MATLAB®, and then act on the data. Sensor data can be sent to ThingSpeak from Arduino®, Raspberry Pi™, BeagleBone Black, and other hardware.
https://thingspeak.com/

Source Code and Library ( To install on Raspberry Pi )

PSUtil Python Library 
PSUtil is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python.

Run Command

sudo apt-get install build-essential python-dev python-pip
sudo pip install psutil

Python code on Github

https://github.com/amphancm/RaspberryPi_ThingSpeak


EDIT Code for your own KEY


















#!/usr/bin/env python
import psutil
import httplib, urllib
import time
import os,sys

from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont

disk = os.statvfs("/")
used = disk.f_bsize * (disk.f_blocks - disk.f_bavail)

sleep = 30            # how many seconds to sleep between posts to the channel
key = 'ZG8WMLWF4PBQQVFB'  # Write Key Thingspeak channel to update

# THIS IS MY KEY for ThingSpeak Channel 238835
# YOUR MUST CHANGE to YOUR WRITE KEY


Run Python code

python performance.py

Result on ThingSpeak

Thingspeak Monitor Example  https://thingspeak.com/channels/238835



Option Add OLED Display



Wiring Diagram
You must install OLED Adafriut Library SSD1306
See this Raspberry Pi connect OLED I2C Display and use code performance_oled.py and Font.


Reference

http://www.iotleague.com/d-i-y-how-to-upload-your-raspberry-pi-sensor-data-to-thingspeak-website

https://thingspeak.com/


My Website

email : info@softpowergroup.net  , amphancm@gmail.com  Tel .6681-6452400 

Android Arduino IoT

วันอาทิตย์ที่ 26 พฤศจิกายน พ.ศ. 2560

Raspberry Pi Bitcoin Miner ( Monero XMR )







Raspberry Pi Bitcoin Miner ( Monero XMR )

What is Bitcoin Mining?

With Bitcoin, miners use special software to solve math problems and are issued a certain number of bitcoins in exchange. This provides a smart way to issue the currency and also creates an incentive for more people to mine.

Why is Monero Coin ( XMR ) ?

Unlike many cryptocurrencies that are derivatives of Bitcoin, Monero is based on the CryptoNote protocol and possesses significant algorithmic differences relating to blockchain obfuscation.
By providing a high level of privacy, Monero is fungible, meaning that every unit of the currency can be substituted by another unit. These units are indistinguishable from one another. This makes Monero different from public-ledger cryptocurrencies like Bitcoin, where addresses previously associated with undesired activity can be blacklisted and refused by network members.
https://getmonero.org/

Why use Raspberry Pi?

Raspberry Pi Board is an 32 bit processor and cpu miner software is 64 bit version only.So you must have to recompile it.
This is for education purpose only.


Prepare Raspberry Pi

Hardware
Raspberry Pi 3B Board with heat sink.
SD Card ( we use 16 GB scandisk ) need to format and install software to it.
Power Supply 5V. 2A

Raspberry Pi OS
We use Raspbian Stretch ( Build 2017-09-07 )  How to write image file to SD card


Raspberry Pi Tools
Putty ( SSH and telnet client for windows )  How to install Putty


Let's Start!!!

Do a SSH connection to your  Raspberry Pi.
We use Putty to connect Raspberry Pi and Login Username and password
( default user : pi , password : raspberry )



Become ROOT!!!
Command   sudo -i



Update Your Raspberry Pi
apt-get update -y



Install Some Library
apt-get install autoconf libcurl4-openssl-dev libjansson-dev openssl libssl-dev gcc gawk automake git -y



Clone cpuminer


git clone https://github.com/lucasjones/cpuminer-multi.git



Then Install 



cd cpuminer-multi


./autogen.sh



Optimize Build for Raspberry pi 3B Version

./configure CFLAGS="-Ofast -mtune=cortex-a53 -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -ffast-math" CXXFLAGS="-Ofast -mtune=cortex-a53 -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -ffast-math" make --always-make Now, Software and Library have install to raspberry pi already. Ready for mining.but you need monero wallet and pool in the next step.



Monero Wallet and Pool

As for mining, you’ll need to create a Monero wallet and find a pool to join. Mining in a pool means you get a small part of the reward for the mining you do. In our example we use MinerGate
https://minergate.com/


To start the mining we use the minerd command

./minerd -a cryptonight -o URL.Your.Pool:port -u worker.1 -p password

For My Example

./mimerd -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45560 -u fongwe_a@hotmail.com -p x



The result
accepted 7.13 H/s at diff 500


On Minergate DashBoard


Mining Profit

On Minergate web has mining profitability calculator.
If Raspberry pi has hash rate are 10 H/s see table below.



Option Check CPU Temp
command
vcgencmd measure_temp



Option Check CPU Temp and CPU % on IoT ThingSpeak
http://raspberrypi4u.blogspot.com/2017/12/raspberry-pi-iot-thingspeak.html


Reference

Compile and Run as service Monero (XMR) CPU miner for RaspberryPi 2 and 3

http://awesomeprojectsxyz.blogspot.it/2017/10/tutorial-compile-and-run-as-service.html
https://minergate.com/
https://getmonero.org/


My Website

email : info@softpowergroup.net   Tel .081-6452400

Android Arduino IoT

วันอาทิตย์ที่ 30 กรกฎาคม พ.ศ. 2560

Raspberry Pi Android Things



Raspberry Pi Android Things


What is Android Things?

Android Things are IoT Platform for Android Developer.Use Development tools and ecosystem the same Android App. So you can use Android Studio to develop Android Things.
and without previous knowledge of embedded system design.
Google has partnered with a number of hardware manufacturers to offer solutions based on Intel Edison, NXP Pico and the Raspberry Pi 3.
Android Things ignites development of connected embedded devices by providing the same Android development tools, best-in-class Android framework, and Google APIs making developers successful on mobile.

Understand the Android Things Platform
Android Things has a few key differences compared to the core Android OS, read the Overview to understand key concepts that you'll need to understand.












Android Things SDK Preview!
https://developer.android.com/things/preview/index.html


Android Things Project
https://github.com/amitshekhariitbhu/awesome-android-things#found-this-project-useful-heart


My Website

email : info@softpowergroup.net   Tel .081-6452400

Android Arduino IoT



LINE : adunfong
FaceBook : https://www.facebook.com/adun.nantakaew
email: amphancm@gmail.com