Author Archives: OLIMEX Ltd

AVR-T32U4 Arduino Leonardo Analog Servo motor drive demo

Image

 

We stock now 6 types of Analog Servo drive motors https://www.olimex.com/Products/RobotParts/ServoMotors/

The motor parameters are encoded in their names:

MS-1.3-9 means – Servo-Motor with 1.3 kg.cm force and 9 gram weight.
MS-R-1.3-9 means Servo-Motor with 360 degree angle and 1.3 kg.cm force and 9 gram weight.

All servo motors came with various exchangable plastic arms:

ImageImage

 

Separately are available aluminum ARMs which can snap to the bigger 3.2 kg.cm and 6 kg.cm motors, these are so powerful than can open and close drawers.

Adruino have special library for servo drive just notice that the normal servos will accept angle between 0 and 120 degree only, while the R type will accept from 0 to 360 degree.

The demo code is on GitHub: https://github.com/OLIMEX/DUINO/tree/master/AVR/SERVO

You can see the code running on this video http://www.youtube.com/watch?v=OdH7dr4Aa30

 

Tagged , , , , ,

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

Tagged , , , ,

AVR-T32U4 Arduino demo code for TV remote control

Image

AVR-T32U4 is easiest way to breadboard your Arduino projects, with this demo we will show you how to connect MOD-IRDA and receive and send IR commands from TV remote control and to TV.

MOD-IRDA have IR receiver and IR LED, in the demo project we will use Jumper wires to connect to Breadboard.

Image

The demo code is at https://github.com/OLIMEX/DUINO/tree/master/AVR/IR-REMOTE

LED is connected to D13 and MOD-IRDA IR receiver is connected to D11.

On the video you can see how LED is switched ON and OFF with ’1′ and ’2′ buttons from the IR remote.

http://www.youtube.com/watch?v=Asbb1Jr1DNs

The same way you can control other stuff with Arduino, for instance connecting Servo motor to move your fences at home etc.

 

Tagged , , ,

AVR-T32U4 ARDUINO demo code for MOD-WII-NUNCHUCK interfacing

Image

 

Wii-Nunchuck is low cost combo of 3 axes accelerometer, 2 axes Joystick and 2 buttons. It communicated via I2C and we made UEXT connector for it so it plugs directly to AVR-T32U4 Arduino compatible breadboard.

The Arduino library is available at: https://github.com/OLIMEX/DUINO/tree/master/AVR/WII-NUNCHUCK with demo code which prints accelerometer, joystick and button status: http://www.youtube.com/watch?v=fodnHXkwpHg

Tagged , , ,

Arduino Breadboarding with AVR-T32U4

Image

 

AVR-T32U4 is the easiest way to do breadboard projects with Arduino. With retail price of EUR 12.95 this is also the Arduino board with best price/performance ratio.

As you see from the picture above AVR-T32U4 snap perfectly to Breadboard-1 and it powers the two power buses with 3.3V and GND and you have access to all Arduino pins A0-A5 and D0-D13 on the breadboard area, so you can easily connect to LEDs, Servo Motors,  Sensors etc.

Here is step by step instructions what you have to do to get started.

1. Download Arduino IDE from http://arduino.cc/en/Main/Software; Unpack the downloaded zip file in main drive C:\arduino-1.0.4

2. Plug AVR-T32U4 to your PC and it will ask for drivers, point it to C:\arduino-1.0.4\drivers

3. After the drivers are installed run C:\arduino-1.0.4\arduino.exe

4. Select the board to be Arduino-Leonardo as per attached picture

Image

 

5. Right mouse click on “My computer” then select Properties-> Hardware-> Device Manager and check which virtual COM port is created when you plug AVR-T32U4.

Image

 

as you see on the picture in this case COM33 is created by Arduino-Leonardo

6. From Arduino menu select the com port as per attached picture:

Image

 

6. Open Blink LED project:

Image

 

7. Upload the sketch by click on -> button

Connect LED with longer led to D13 and shorter leg via 220 ohm to GND.

You should see the LED blinking as on this video: http://www.youtube.com/watch?v=M0cVerSNUDc

Congratulations you just complete your first Arduino project!

We also highly recommend you when you do prototype work to put USB-ISO between your Arduino and PC in this case even if you do some stupid like to make short on your Arduino board or put wrong voltage somewhere your PC will be always protected, so even if your Arduino board burn your computer will be safe.

Tagged , , , ,

Weekend Programming Challenge Issue-9 Solutions

Image

 

We got 7 solutions for the Issue-9 challenge: 

  • 3 C
  • 2 Java
  • 1 C#
  • 1 Python

I’m surprised that we didn’t got more solutions as this challenge was pretty simple. Maybe the picture I put on the Challenge confused you?

What you have to do is to pick random (or first) three points and calc the radius and centre coordinates of the circle which pass through them (3 points always define circle).

Then to check rest of the point if belong to same circle which is trivial using Pythagorean theorem.

Tagged , , ,

Weekend Programming Challenge Issue-9

Image

 

Problem:

Let have N (3..100) points with X,Y coordinates. Make code which checks if there is circle which to pass through all of them.

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday May 19th.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

Tagged , , ,

FRIDAY FREE BOARD QUIZ ISSUE #41 PRIZE IS SERVO MOTOR MS-6-40

Image

MS-6-40 https://www.olimex.com/Products/RobotParts/ServoMotors/MS-6-40/ is 40 gram Analog Servo Motor with 6 kg.cm drive force. You can make lot of interesting projects with it and AVR-T32U4, OLIMEXINO-328, OLIMEXINO-STM32 and PINGUINO have ready to use Servo drive libraries. 

You have chance to win this pack if you answer today’s Quiz question.

Today at 17.00 o’clock our local Bulgarian time (GMT+3) we will post on Twitter our questions.

You have one hour to reply to our tweet with the correct answer.

At 18.00 o’clock we will count the correct answers and ask random.org to generate random number in range then announce the winner and ship the board by airmail in Monday.

Do not forget at 18.00 o’clock we will post our Weekly Programming Challenge #9, yet another way to challenge your programming skills

Tagged

A10S-OLinuXino-MICRO Python GPIO module

Image

 

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

 

Tagged , ,

Weekend programming challenge issue-8 solutions

Image

 

Here are the Solutions for Issue#8, enjoy them! https://github.com/OLIMEX/WPC/tree/master/ISSUE-8

Although it seems simple on first sight this is really hard to implement for a weekend when you get into details, so congratulations to all who submitted solution!

The exotics this time is the solution written in linux shell language, I would never think this is possible before I saw it :)

 

Tagged , ,
Follow

Get every new post delivered to your Inbox.

Join 219 other followers