Monday, September 19, 2016

Xamarin: The best way to develop Multi-platform Apps


Xamarin is a framework made by Microsoft to let developers to develop apps running natively on multiple platforms (Windows, iOS, Android).

The beauty about this framework SDK is enabling us to make apps running natively.  Our code is developed in C# (so for Windows we need to have Ms. Visual Stdio).  It uses native UI for its apps, so once we develop an app for Windows, for example, it's also compilable on Mac OS without code changes.  The same for Android.

The framework can be downloaded freely for Windows and MacOS:

https://www.xamarin.com/platform

Wednesday, September 14, 2016

Distributed Machine Learning - Opensource Deep Neural Network

It is product of Google Research, now is available as Python framework for neural network based processing.

https://github.com/tensorflow/tensorflow

The cool thing about it is that it is able to utilize GPU(s) for its processing.

TensorFlow was originally developed by researchers and engineers working on the Google Brain Team within Google's Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well.



Tensors Flowing

Little more about tensor: https://en.wikipedia.org/wiki/Tensor


Monday, September 12, 2016

Wednesday, September 7, 2016

ATMEGA32 Kit






UPS on Linux

Install nut

The following example is for Tripp Lite UPS
Verify the Tripplite UPS:

# lsusb
Bus 002 Device 026: ID 09ae:2010 Tripp Lite 


Edit /lib/udev/rules.d/52-nut-usbups.rules and make sure the line below exists:

ATTR{idVendor}=="09ae", ATTR{idProduct}=="2010", MODE="664", GROUP="nut"

Reload the udev files:

udevadm control --reload-rules
My UPS definition in /etc/nut/ups.conf:

[tripplite_ups]
    driver = usbhid-ups
    port = auto
    vendorid= 09ae
    productid = 2010
    desc = "Tripp-Lite UPS"

(The library file is located in /lib/nut)

My /etc/nut/upsd.conf:
LISTEN 127.0.0.1        3493
LISTEN 192.168.25.168   3493
LISTEN 192.168.1.1      3493
LISTEN ::1              3493

Restart the driver:

$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.2
Network UPS Tools - Generic HID driver 0.38 (2.7.2)
USB communication driver 0.32
Using subdriver: TrippLite HID 0.81

If no error, that means everything is working fine.

My /etc/nut/upsd.users contains:

[upsmon]
    password = pass
    upsmon  master

My /etc/nut/upsmon.conf contains:

MONITOR tripplite_ups@localhost 1 upsmon pass master
SHUTDOWNCMD "/sbin/shutdown -h +0"
NOTIFYCMD /usr/local/bin/upsnotifyme
#NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC
NOTIFYFLAG ONLINE SYSLOG+EXEC
NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
NOTIFYFLAG FSD    SYSLOG+WALL+EXEC
NOTIFYFLAG COMMOK SYSLOG+EXEC
NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC
NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC
NOTIFYFLAG NOCOMM SYSLOG+EXEC
NOTIFYFLAG NOPARENT SYSLOG

Restart the nut-server and client:

sudo service nut-server restart
OptiPlex-9020:/lib/udev/rules.d$ sudo service nut-client restart
                          
                                                                     
If it works, your PC can now communicate with UPS.

Sunday, March 27, 2016

SBC IoT

Single Board Computer for Internet of Things now are getting more popular since Raspberry Pi.  Now we can see even 64-bit SBC with less than $40 price tag!

Following is the list of SBCs I can think of:


MakerModelCPUPriceWebsiteMisc.
Raspberry-PiRPI1 Model A+BCM2835$25https://www.raspberrypi.org
Raspberry-PiRPI1 B+$35https://www.raspberrypi.org
Raspberry-PiRPI2 Model BBCM2836$35https://www.raspberrypi.org
Raspberry-PiRPI 3 Model B$35https://www.raspberrypi.org
Raspberry-PiZero$5https://www.raspberrypi.org
CHIPAllWinner R8 (ARM)$9http://www.allwinnertech.com
Pine64Cortex-A53 AllWinner A64$15 - $29http://www.pine64.com
FriendlyARMNanoPi 2 (I/O ports compatible with RPi)Quadcore A9$24.99http://www.friendlyarm.com
Texas InstrumentsARM TIVA LaunchPADARM Cortex M4F$12.99Datasheet
STM MicroelectronicsNUCLEO-F103RBARM Cortex M3$10.33Product InfoDev. Board is compatible with Arduino


I personally like the FriendlyARM as it is more open system than Raspberry Pi. Broadcom is known for being paranoid to reveal the details of their products as we can see from their datasheets. FriendlyARM is more community-friendly and provides a lot of stuff already. With the damn-cheap price and the board is ready out of the box (unlike Rpi which still needs flash card), this kit is very exciting, even more interesting than Arduino.