Monday, February 29, 2016

What’s New for Windows IoT Core Insider Preview for Raspberry Pi 3

You can immediately download Windows IoT Core for use on your Raspberry Pi 3 that offers the following benefits:

  • Functional parity with RPi2, including Windows as a service updating and flighting model and a single FFU for RPi2 and RPi3
  • Open sourcing Pi BSP to encourage community innovation/speed and support commercialization efforts

Coming Soon in a future release of Windows IoT Core Insider Preview

  • Onboard WiFi & Bluetooth, but in the meantime you can still use a compatible USB WiFi/Bluetooth dongle.
  • Functionality for unique innovation, including remote app UI to a phone or windows device, remoting of sensors and actuators from a windows device via UWP and closed loop control capable hardware interrupts via Arduino Wiring and our high performance driver.

source: http://ms-iot.github.io/content/en-US/win10/WhatsNew.htm


Ubuntu MATE 15.10 for the Raspberry Pi 3 Model B

Ubuntu-Mate.org's blog announced  the immediate availability of Ubuntu MATE 15.10 for the Raspberry Pi 3 Model B!

The Ubuntu MATE image have prepared supports the integrated Wifi on the Raspberry Pi 3 but support for the integrated Raspberry Pi 3 Bluetooth is still in progress and we hope to enable full support via an update very soon.

details: Ubuntu MATE for Raspberry Pi 3

Updated@2014-04-26:
Download, install and boot-up Ubuntu MATE 16.04 on Raspberry Pi 3

Announcing the Raspberry Pi 3

The Raspberry Pi 3 is 10x faster than the original Raspberry Pi single board computer, includes built-in WiFi and Bluetooth, and is still only $35 USD.

The Specs:
  • Quad-core 64-bit ARM Cortex A53 clocked at 1.2 GHz
  • Roughly 50% faster than Raspberry Pi 2
  • 802.11n Wireless LAN
  • Bluetooth 4.1 (including Bluetooth Low Energy)
  • 400MHz VideoCore IV multimedia
  • 1GB LPDDR2-900 SDRAM (i.e. 900MHz)
  • Priced at $35

More here: http://makezine.com/2016/02/28/meet-the-new-raspberry-pi-3/

Saturday, February 27, 2016

How to Connect to a Raspberry Pi Directly with an Ethernet Cable

If you use SSH or remote desktop apps to get access to your Raspberry Pi, connecting to it from your laptop or desktop directly with an ethernet cable is the fastest and most reliable way to do it. In just a few steps, you can set this up and never be disconnected from network time outs and low bandwidth on your network. You can actually access your Pi without even being on a network. If you travel with your Pi, all you need is a laptop and an ethernet cable to connect to your Pi!

See the full tutorial here: http://www.circuitbasics.com/how-to-connect-to-a-raspberry-pi-directly-with-an-ethernet-cable/


Friday, February 26, 2016

Install Qt5/Qt Creator for Raspberry Pi 2/Raspbian Jessie


For Raspbian Jessie, qt5-default (Qt 5 development defaults package) is included in default repository. Here show how to install Qt5 and Qt Creator on Raspberry Pi 2 running frash new Raspbian Jessie, release 2016-02-09.

As my usual practice, update apt repository and firmware:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo rpi-update

Then reboot if need.

Install xrdp, such than I can control Raspberry Pi remotely from Windows, and capture screen action.
$ sudo apt-get install xrdp

install qt5-default and qtcreator:
$ sudo apt-get install qt5-default
$ sudo apt-get install qtcreator


Once installed, you can run Qt Creator from desktop menu:
Menu > Programming > Qt Creator

or, enter the command in LXTerminal:
$ qtcreator

In my test, Qt Creator CANNOT run remotely from Windows using Microsoft Remote Desktop:


It can run locally:


And can run remotely from Windows using Putty/Xming:


As show in the videos, the code cannot be compiled with default setting caused by:
"Qt Creator needs a compiler set up to build. Configure a compiler in the kit options"

To fix it, refer to the above videos.

But, in my test, the compiler option cannot be saved, and I have to correct it every-time running Qt Creator.

Related:
- Same steps to Install Qt5/Qt Creator for Raspberry Pi 3/Raspbian Jessie


Tuesday, February 23, 2016

ChromiumRPI V0.4 (Chromium OS for Raspberry Pi 2) released

ChromiumRPI V0.4 (Chromium OS for Raspberry Pi 2), named "Lenny Bruce", official released. refer https://www.reddit.com/r/ChromiumRPI/comments/46khws/official_release_chromiumrpi_v04_lenny_bruce_link/


Tizen 3.0 on the Raspberry Pi 2

The Samsung Open Source Group is currently in the process of porting Tizen 3.0 to the Raspberry Pi 2 (RPi2), aim to create a device capable of running a fully-functional Tizen 3.0 operating system.


source: http://blogs.s-osg.org/tizen-on-rpi2/

Dartino - write software using Dart language for embedded systems, include Raspberry Pi 2

Dartino is an experimental open-source project that enables you to write software for embedded systems with much higher productivity than existing native approaches.

Dartino is powered by the Dart language, a modern programming language. The Dart language uses a familiar syntax with clean semantics, so you can probably already read and even write Dart code!

Dartino currently support ST STM32F746 Discovery and Raspberry Pi 2 directly.

ST STM32F746 Discovery

Raspberry Pi 2

Visit project pagem for details: https://dartino.org/

Monday, February 22, 2016

Raspbian Jessie 2016-02-09 released

Raspbian Jessie 2016-02-09 released, DOWNLOAD HERE.

Release notes:
2016-02-09:
  * dtb that uses mmc sdcard driver (fixes problems experienced with certain SD cards)
2016-02-03:
  * new version of Sonic Pi (2.9)
  * new version of Scratch (15/1/16)
  * new version of Node-Red (2.5)
  * new version of Wolfram (10.3)
  * optional experimental GL desktop driver (can be enabled using advanced options in command-line raspi-config)
  * new version of Java (1.8.0_65)
  * new version of WiringPi
  * raspi-gpio included
  * ping no longer requires sudo (except NOOBS installs)
  * support for more USB audio devices in lxpanel
  * bug fix for creation of new menus in Alacarte
  * various changes to raspi-config and GUI to tidy up board support and fix bugs, and updated translations
  * small tweaks to theme to support GL driver
~ link to Release notes.

Friday, February 19, 2016

Getting Started with Wolfram Language and Mathematica for Raspberry Pi

Getting Started with Wolfram Language and Mathematica for Raspberry Pi

Raspberry Pi with Raspbian OS has built-in Wolfram Language and Mathematica. This book helps you to get started with Wolfram Mathematica programming in Raspberry Pi environment. The following is highlight topic in this book:
* Preparing Development Environment
* Essentials of Wolfram and Mathematica Programming Language
* Computational Mathematics
* GPIO Programming
* Serial Communication

Thursday, February 18, 2016

Programming the BeagleBone

Master BeagleBone programming by doing simple electronics and Internet of Things projects

Programming the BeagleBone

About This Book
  • Quickly develop electronics projects that interact with Internet applications using JavaScript and Python
  • Learn about electronics components such as sensors and motors, and how to communicate with them by writing programs
  • A step-by-step guide to explore the exciting world of BeagleBone—from connecting BeagleBone to doing electronics projects and creating IoT applications
Who This Book Is For
This book is for anyone who wants to learn programming on embedded systems and understand key concepts such as GPIO, PWM, and Bus. It is intended for programming beginner who is willing to work on electronics projects and basic IoT applications. This book will be helpful to BeagleBone owner who wants to quickly implement small-scale home automation solutions. Some hands on is expected on C or Python. Some familiarity with electronics is helpful. However, it is not essential.

What You Will Learn
  • Connect your BeagleBone to a computer in different ways and get Cloud9 IDE running to quickly start programming on the BeagleBone
  • Get to know BeagleBone extension pins, such as GPIO, and how to connect various electronic components to the BeagleBone
  • Read and write to various electronic components, such as LEDs, push buttons, sensors, and motors
  • Grasp in-depth theory on Analog, PWM, and BUS programming and the electronic components used in programs
  • Handle data to and from various BUS-supporting modules, such as UART, I2C, and SPI, using the Adafruit BBIO Python library
  • Write real-life IoT applications in JavaScript and Python, such as sending an e-mail on overheat and controlling a servo motor remotely
  • Make use of free online cloud services to store and analyze sensor data collected on the BeagleBone
In Detail
The BeagleBone is an ultra-small, cost-effective computer that comes with powerful hardware. It runs a fully-fledged Debian Linux OS and provides numerous electronics solutions. It gives you all the benefits of a Linux kernel, such as multitasking, multi-users, and extensive device driver support. It allows you to program in many languages, including high-level languages such as JavaScript and Python.

This book aims to exploit the hardware and software capabilities of the BeagleBone to create real-life electronics and Internet of Things (IoT) applications quickly. It is divided into two parts. The first part covers JavaScript programs. The second part provides electronics projects and IoT applications in Python. Starting with the basics needed to set up the BeagleBone and Cloud9 IDE, this book covers interfacing with various electronics components via simple programs. Finally, the book helps you create some real-life IoT applications.

Home Automation Projects with the Raspberry Pi & the ESP8266

Home Automation Projects with the Raspberry Pi & the ESP8266: Connect the ESP8266 to your Raspberry Pi to Build Home Automation Projects

By reading this book, you will learn how to build exciting home automation projects using the Raspberry Pi & the ESP8266 WiFi chip. You will learn how to use the Raspberry Pi as the hub of your home automation system, and how to connect ESP8266 devices to this hub, by building sensors, lamp controllers, and motion sensors. At the end, you will be able to build your own home automation system using these two pieces of hardware.

Sunday, February 7, 2016

c language to get MAC address, run on Raspberry Pi/Raspbian Jessie


c language to get MAC address, run on Raspberry Pi/Raspbian Jessie:


reference: http://www.geekpage.jp/en/programming/linux-network/get-macaddr.php

cMAC.c
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>

int
main()
{
    int fd;
    struct ifreq ifr;
    
    fd = socket(AF_INET, SOCK_DGRAM, 0);
    
    ifr.ifr_addr.sa_family = AF_INET;
    strncpy(ifr.ifr_name, "eth0", IFNAMSIZ-1);
    
    ioctl(fd, SIOCGIFHWADDR, &ifr);
    close(fd);
    
    printf("%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",
        (unsigned char)ifr.ifr_hwaddr.sa_data[0],
        (unsigned char)ifr.ifr_hwaddr.sa_data[1],
        (unsigned char)ifr.ifr_hwaddr.sa_data[2],
        (unsigned char)ifr.ifr_hwaddr.sa_data[3],
        (unsigned char)ifr.ifr_hwaddr.sa_data[4],
        (unsigned char)ifr.ifr_hwaddr.sa_data[5]);
        
    return 0;
}


Related:
Java to list Network Interface Parameters (include MAC address)
Python to get MAC address using uuid

Python to get MAC address using uuid, run on Raspberry Pi/Raspbian Jessie


Python example code to get MAC address using uuid, run on Raspberry Pi/Raspbian Jessie, tested on both Python 2 and Python 3.


PythonGetMac.py
from uuid import getnode as get_mac
mac = get_mac()
print(mac)
print(hex(mac))
macString = ':'.join(("%012X" % mac)[i:i+2] for i in range(0, 12, 2))
print('[' + macString + ']')


Related:
Java to list Network Interface Parameters (include MAC address), run on Raspberry Pi/Raspbian Jessie
c language to get MAC address, run on Raspberry Pi/Raspbian Jessie



Java to list Network Interface Parameters (include MAC address), run on Raspberry Pi/Raspbian Jessie


Java example code to list Network Interface Parameters (include MAC address), run on Raspberry Pi/Raspbian Jessie.


ListNetsEx.java
import java.io.*;
import java.net.*;
import java.util.*;
import static java.lang.System.out;

public class ListNetsEx {
    
    public static void main(String args[]) throws SocketException {
        Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
        for (NetworkInterface netint : Collections.list(nets))
            displayInterfaceInformation(netint);
    }

    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
        out.printf("Display name: %s\n", netint.getDisplayName());
        out.printf("Name: %s\n", netint.getName());
        Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
        
        for (InetAddress inetAddress : Collections.list(inetAddresses)) {
            out.printf("InetAddress: %s\n", inetAddress);
        }
       
        out.printf("Up? %s\n", netint.isUp());
        out.printf("Loopback? %s\n", netint.isLoopback());
        out.printf("PointToPoint? %s\n", netint.isPointToPoint());
        out.printf("Supports multicast? %s\n", netint.supportsMulticast());
        out.printf("Virtual? %s\n", netint.isVirtual());
        
        byte[] mac = netint.getHardwareAddress();
        
        out.printf("Hardware address: %s\n",
                    Arrays.toString(mac));
        
        //Print MAC (Hardware address) in HEX format
        if(mac != null){
            StringBuilder sbMac = new StringBuilder();
            for (int i = 0; i < mac.length; i++) {
                sbMac.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? ":" : ""));      
            }
            out.printf("Hardware address (HEX): [%s]\n", sbMac.toString());
        }
                    
        out.printf("MTU: %s\n", netint.getMTU());
        out.printf("\n");
     }
}


reference:
The Java Tutorials - Network Interface Parameters

Related:
Python to get MAC address using uuid, run on Raspberry Pi/Raspbian Jessie
c language to get MAC address, run on Raspberry Pi/Raspbian Jessie

Saturday, February 6, 2016

C example to getting IP address from a network interface, run on Raspberry Pi/Raspbian Jessie


C example to getting IP address from a network interface, run on Raspberry Pi/Raspbian Jessie.


Reference: http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php

cIP.c
#include <stdio.h>

#include <string.h> /* for strncpy */

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <net/if.h>

/*
 *  Getting IP address from a network interface
 *  reference: http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php 
 * 
 */
 
int main()
{
    int fd;
    struct ifreq ifr;

    fd = socket(AF_INET, SOCK_DGRAM, 0);
    
    /* I want to get an IPv4 IP address */
    ifr.ifr_addr.sa_family = AF_INET;
    
    /* I want IP address attached to "eth0" */
    strncpy(ifr.ifr_name, "eth0", IFNAMSIZ-1);
    
    ioctl(fd, SIOCGIFADDR, &ifr);
    
    close(fd);
    
    /* display result */
    printf("%s\n", inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr));
    
    return 0;
}


Related:
Java code to listing Network Interface Addresses, run on Raspberry Pi/Raspbian Jessie
Python code to find my IP address, run on Raspberry Pi/Raspbian Jessie

Python code to find my IP address, run on Raspberry Pi/Raspbian Jessie


Python example code to find my IP address, run on Raspberry Pi/Raspbian Jessie.


PythonListInetAddress.py
import socket
import commands

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#connect to any target website
s.connect(('google.com', 0))
ipAddress = s.getsockname()[0]
s.close()

print("IP Address from socket:")
print(ipAddress)
print("")

print("ifconfig output:")
print(commands.getoutput("ifconfig"))
print("inet addr from ifconfig output:")
print(commands.getoutput("ifconfig").split("\n")[1].split()[1][5:])

remark@2016-02-14:
Refer to comment from baskeddy:
Have to changed the port to 80 in the socket.connect()

From: 
s.connect(('google.com', 0))

to:

s.connect(('google.com', 80))

Related:
Java code to listing Network Interface Addresses
C example to getting IP address from a network interface

Java code to listing Network Interface Addresses, run on Raspberry Pi/Raspbian Jessie


The following example program lists all the network interfaces and their addresses on a machine, run on Raspberry Pi 2/Raspbian Jessie.


JavaListInetAddress.java
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Collections;
import java.util.Enumeration;

public class JavaListInetAddress {

    public static void main(String[] args) throws SocketException {
        Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
        for (NetworkInterface netint : Collections.list(nets))
            displayInterfaceInformation(netint);
    }
    
    static void displayInterfaceInformation(NetworkInterface netint) throws SocketException {
        System.out.printf("Display name: %s\n", netint.getDisplayName());
        System.out.printf("Name: %s\n", netint.getName());
        Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
        for (InetAddress inetAddress : Collections.list(inetAddresses)) {
            System.out.printf("InetAddress: %s\n", inetAddress);
        }
        System.out.printf("\n");
     }
    
}


reference: https://docs.oracle.com/javase/tutorial/networking/nifs/listing.html

Related:
Java code to listing Network Interface Addresses, run on Windows 10
Python code to find my IP address, run on Raspberry Pi/Raspbian Jessie
C example to getting IP address from a network interface, run on Raspberry Pi/Raspbian Jessie

Next:
Java to list Network Interface Parameters (include MAC address)

Monday, February 1, 2016

Getting Started with Arduino Wiring for Windows 10 IoT Core

Getting Started with Arduino Wiring for Windows 10 IoT Core

If you have experiences in Arduino development using Sketch program, your Sketch program can run on Raspberry Pi 2 with Windows 10 IoT Core. This book helps you get started with Arduino Wiring development using Visual Studio 2015. The following is highlight topics in this book:
* Setting Up Development Environment
* Digital I/O
* Serial Communication
* Analog I/O
* Working with I2C/TWI Protocol
* Working with SPI Protocol