Getting started with A13-OLinuXino blog post on element14

Image

 

We spotted blog post on element14 about Getting started with A13-OLinuXino

pyA10Lime 0.1.0. Python library for GPIO access

Image

We just uploaded pyA10Lime https://pypi.python.org/pypi/pyA10Lime/

>>>import A10Lime as lime

# Initialize module
>>>lime.init()

# Read configuration of GPIO
>>>lime.getcfg(lime.PC3)
# or you can use
>>>lime.getcfg(lime.PIN1_29)

# You can address GPIO either by pin numeration or port name
# For example PG0 pin on GPIO-1 connector can be accessed with lime.PG0 or lime.PIN1_5

# Set configuration
>>>lime.setcfg(lime.PC3, lime.OUTPUT)
>>>lime.setcfg(lime.PC3, lime.INPUT)

# Set output level
>>>lime.output(lime.PC3, lime.HIGH)
>>>lime.output(lime.PC3, lime.LOW)

# Read input state
>>>lime.input(lime.PC3)

# Read detailed info about pin
>>>lime.info(lime.PC3)
>>>lime.info(lime.PIN1_29)

New Product in stock: A10-OLinuXino-LIME-UEXT adapter

Image

A10-OLinuXino-LIME-UEXT is adapter board with Male connector on 0.05″ which can connect to A10-OLinuXino-LIME GPIOs with  0.05″ step ribbon CABLE-40-40-10CM and allow LIME GPIOs to be used with BREADBOARD-1, or with A13-LCD43TS, A13-LCD7TS or A13-LCD10TS.

For the moment A20-LCD15.6 is not supported as LVDS signals got noisy when pass through A10-OLinuXino-LIME-UEXT but we are looking for solution.

UEXT signals can be used only when connected to GPIO1. On the other connectors UEXT signals will be not present.

New A20 Android 4.2.2 image now supports all A20-OLinuXino-MICRO hardware features

Image

We received A20-SDK2.0 from Allwinner few weeks ago and were working to generate image for A20-OLinuXino but our aim was to add support to all hardware features the board offers. The process was pretty slow as the compilation is very heavy and even small change requires hours of waiting the image generation to complete.

Now we are ready, the only two features left unsupported are the SATA and second SD-MMC card on the bottom but we think that we should give it a break for a while or our heads will explode :)

Two images are uploaded on Wiki: one for 7″LCD and one for 10″LCD, the good news is that the Android 4.2.2 with SDK2.0 now support higher resolution as previous SDK for ICS 4.0.3 had hardcoded 800×600 max resolution which made 10″LCD and HDMI useless.

The image have:

  • LCD and HDMI support at same time
  • Touchscreen support
  • GPIO support – we prepare Android application demo code which show how you can access and use GPIOs under Android
  • I2C1 and I2C2 support – we prepare Android application demo code which show how you can access and use I2C under Android
  • 100Mbit Ethernet
  • USB-Ethernet AX88772
  • USB WiFi RTL8188
  • microSD
  • Audio Out, Audio In
  • USB-OTG device and host with Low/Full/High speed
  • USB HOST upper and bottom with Low/Full/High speed
  • UART6 and UART7 support on UEXT connectors  – we prepare Android application demo code which show how you can access and use UART6,7 under Android
  • Buttons

Python GPIOs module for A20-OLinuXino-MICRO

Image

pyA20 GPIO module is uploaded yesterday to Pypi https://pypi.python.org/pypi/pyA20/0.1.0

The use is same as the Python modules for imx233, A10S, A13 OLinuXino:

#!/usr/bin/env python
import A20_GPIO as GPIO
#init module
GPIO.init()
#configure module
GPIO.setcfg(GPIO.PIN#, GPIO.OUTPUT)
GPIO.setcfg(GPIO.PIN#, GPIO.INPUT)
#read the current GPIO configuration
config = GPIO.getcfg(GPIO.PIN#)
#set GPIO high
GPIO.output(GPIO.PIN#, GPIO.HIGH)
#set GPIO low
GPIO.output(GPIO.PIN#, GPIO.LOW)
#read input
state = GPIO.input(GPIO.PIN#)
#cleanup
GPIO.cleanup()

this is initial release so if you find some bugs please report back to us :)

A10S-OLinuXino ANDROID GPIO control LED toggle app

Image

We got lot of requests on our forum how to control GPIOs from Android.

With the new A10S Android image we decided to play a bit and it appear to be not hard to implement.

We found two ways to do GPIO control running Android.

GPIO using ADB

1. Boot android (from nand or sdcard)

2. Connect USB-to-Serial cable on UART1

3. Open terminal at speed 115200

4. When loading is ready in the terminal type “sh” and enter

5. “ls /sys/class/gpio_sw” will give you a list of all accessable GPIOs.

The GPIOs name is according to the chip ports. For example PE3 is LED1.

6. To set PE3 as output:

#echo 1 > /sys/class/gpio_sw/PE3/mul_sel

or as input

#echo 0 > /sys/class/gpio_sw/PE3/mul_sel

7. To turn on LED:

#echo 1 > /sys/class/gpio_sw/PE3/data

and to turn off:

#echo 0 > /sys/class/gpio_sw/PE3/data

8. If GPIO is as input to read state:

#cat /sys/class/gpio_sw/PE3/data

GPIO using Android SDK

Basicly you should read and write to the filesys. Make sure that your app is running as root, or else nothing will happen.

The demo program toggle LED1 on every button press.  The sources are at GitHub: https://github.com/OLIMEX/OLINUXINO/tree/master/SOFTWARE/A10S/A10S-ANDROID-GPIO

All read/write methods are realized in GPIO.java file.

The application is with single button and each time you press it it toggles the green LED on the board.

TOGGLE

You can see ToggleLED.apk running at this video: http://www.youtube.com/watch?v=8kTUkJx2TgQ

A10S-OLinuXino-MICRO Python GPIO module

Image

pyA10S GPIO ports module is available at: https://pypi.python.org/pypi/pyA10S/0.1.2

Previous Older Entries

Follow

Get every new post delivered to your Inbox.

Join 520 other followers