Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Thursday, October 23, 2014

Tah - Lego block for Internet of Things


TAH Main Board
In this blog post I am going to introduce the Tah platform and talk about some of the applications using it.

Tah is a hardware as well as a software platform.  The hardware has following characteristics
  1. An Arduino with Bluetooth Low Energy (BLE)
  2. Onboard USB (HID device) - emulating a keyboard and a mouse
  3. Great building block (like a LEGO) for your home automation systems using Arduino.

USB HID-Compatible
ATmega32u4 — the microcontroller at the heart of Tah — has onboard USB 2.0 support, that is used to directly program the Tah without having to use a USB-to-Serial converter. Tah can also act as a USB human interface device (HID), which enables you to create your own keyboard, mouse, joystick, or other input devices, all without the need for installing special software on the host computer. If you want to create a new smarter custom keyboard that communicates with your smartphone, you need not look beyond the Tah. It already has sample applications that allow you to control your PC, Mac, Linux, PlayStation and Xbox without ever needing to write any code for those platforms — all you need to do is program your Tah board and make a smartphone app, for which we’ve also provided open source examples for both iOS and Android to get you started.

Bluetooth Beacon

Each Tah board can serve as a Bluetooth beacon which tells your smartphone where exactly it is located based on the beacon’s unique identifier. This is amazing for indoor navigation, contextual notifications, and microlocalization.



Here are some of the interesting applications that can be built using the Tah and its shields.

Infrared Control (IR Transceiver Shield)

IR has been used for near range wireless communication for a long time. We have TVs, music systems, air conditioners and so many other things that have their own remote control  
We have created an IR shield which has a transmitter as well as a receiver on board. With this connected to your Tah, you have a universal remote that can be controlled from your smartphone. Forget keeping a bunch of remotes to control everything in your living room. You could do all of that from a single app on your phone. 

Relays (Relays + Sensors Shield)

Electronics is usually associated with low voltage DC appliances but so much of what we use everyday runs on 110V/220V AC. All our light bulbs, fans and everything else.  
To control these there is a Relay shield that translates signals between DC and AC so to speak. One can use the GPIO pins 2 and 3 from the Tah to control 2 relays. 
Bridge the gap between electronics and electrical with this relay plus sensor shield. It comes with its own app which you can use with some standard sensors such as the depth and temperature sensors among others.
  • Input working voltage: 7V to 12V DC
  • Two Relays rated 5V DC.
  • Load Capacity: 10A/120VAC, 10A/24VDC, 7A/250VAC
  • Relays are connected to Pin number 2 and 3 of Tah
  • Digital Pin Numbers 4 to 13 & Analog Pin Numbers A0 to A5 all are connected to 3 pin standard Grove connector

Arduino

That's why we have the Shield Shield which consists of the Arduino UNO R3 layout which let's you use the already available shields in their projects. This shield makes Tah compatible with all existing Arduino Shields, It means all your Arduino-compatible shields are also compatible with the Tah. (Input working voltage: 7V to 12V DC)

---
By no means is the above list comprehensive. There are many more amazing things that can be built using the Tah.  


Examples on the website. A forum to discuss more about this.

If you would like this device, you can grab them here.

(This is a product of Reavealing Hour Creations who run this blog and the IOT Community)


Sunday, January 19, 2014

Connect BeagleBone Black to Android (xpost)

19th January '14
Some of the methods that I think can be used to setup duplex communication between an Android application and a Beaglebone Black.
  1. Android uses the mtp filesystem. You can setup libmtpfs and mtptools on your BeagleBone Black. Then connect the Android device to the USB host port of BBB, mount the Android filesystem in Angstrom and read/write on files there. Problem with this method is there is no recipe for libmtp in the Angstrom kernel tree here OpenEmbedded has support for mtp here. So it might not be a difficult thing to get mtp to play along with a BBB.
  2. Android has the AOA protocol(Android Open Accessory Protocol). It basically allows one to connect an Android device to an Arduino. Look at ADK Rowboat project has implemented the protocol for the BeagleBone. According to me there isn't any difference between BBB and BeagleBone White when it comes to this, but I was unsuccessful while getting the rowboat project to work on the Black.
  3. Bluetooth : You could attach a USB dongle like this to your BBB. bluez on Linux allows you to pair devices too.
  4. Similar to method number 1, we have a protocol called PTP (Picture Transfer Protocol). PTP makes your Android device appear as a camera. PTP is a subset of MTP . I was able to use gphoto2, a tool based on PTP, to get and put files on an Android device connected to the Beaglebone Black.
Basic outline is as follows :
opkg update
opkg install libusb-@-dev #Replace @ with the latest version number
libusb comes pre installed with Angstrom. We need the -dev version to build libgphoto2 and gphoto2.
Next fetch the tars available on the sourceforge pages
Untar both the files, and run the following commands in each.
./configure
make
make install
First install, libgphoto, followed by the gphoto tool. Now you should be able to use gphoto2 tool from the command line on the beaglebone black.
Next we look at some of the commonly used options with gphoto2.
  • --list-ports
    If you installed libusb correctly, running gphoto2 with this option will show you 6 results. We are interested in the one that reads USB.
  • --auto-detect
    This will detect the cameras (in our case the Android device), that's connected to the beagle. It will show it's model number.
  • --list-files
    This will list all the files that are present on the mounted device.
A comprehensive list can be found at the man page.
This neat setup should help in a lot of projects that I have in mind :)

- Anuj Deshpande