Archive for software

ATTiny85 LSM303 Library

Description

This library is a port from the Pololu LSM303 library to be used with atmega Attiny85 using the Arduino bootloader.

It was designed to be used in small and affordable devices that don’t require many GPIO but would benefict from the use of a lsm303dlhc sensor.

It can be used to interface with our LSM303DLHC breakout board: http://www.dronetech.eu/store/index.php?route=product/product&product_id=51

We are still developing this library so follow the source code in GITHUB to get the lastest version.

Resources

Source code (GITHUB)


Dependencies

Wiring Example

LSM303DLHC    Attiny85
LREF      ->  5V (assuming your attiny is working at 5V)
VCC       ->  3.3V (regulated)
GND       ->  GND
SDA       ->  PB0
SCL       ->  PB2

Instalation

Unzip this folder to the Arduino Libraries folder.

Code Examples description


TinyHeading

Sends the current heading to the serial port using TinyDebugSerial

Wiring
Attiny85
PB3     ->  Serial RX 
PB0     ->  SDA 
PB2     ->  SCL

*note: since it uses the TinyDebugSerial it can only be used with the tiny-core

TinySerialData

Sends raw and filtered accelerometer data to serial port in csv format.

Wiring
Attiny85
PB3     ->  Serial RX 
PB0     ->  SDA 
PB2     ->  SCL

*note: since it uses the TinyDebugSerial it can only be used with the tiny-core *note2: it can be visualized with the DTSerialChart available here: http://blog.dronetech.eu/dronetech-serial-visualizer/

TinyStabilizer

Drives two micro servos compensating the pitch and roll of the board.

It uses only accelerometer data with a low pass filter. Slow and noisy but effective.

Wiring
Attiny85
PB3     ->  Servo
PB1     ->  Servo
PB0     ->  SDA 
PB2     ->  SCL

*note: this example requires de Servo8bit library available here: https://github.com/fri000/Servo8Bit

Dronetech Serial Visualizer

Description

This application reads a Serial Port for a csv string and parse it to a chart.

The chart series are customized and it can save the chart in a png file for future reference.

All data from serial port is saved in a textbox so it can be exported after to excel or other program for further analysis.

ScreenShots

application screenshot

Application screenshot

image_output

Output Image

Dependencies

  • .Net Framework 4.0
  • Visual Studio 2010

Files

Lastest compiled version (Windows MSI)

Source Code

Example usage

  • Prepare an arduino board with a example sketch that produces a csv serial stream
  • Connect a UART adapter to the USB port (http://www.dronetech.eu/store/index.php?route=product/product&product_id=53)
  • Connect the TX arduino to the RX of the adapter
  • Select port, baud, interval and series format.
  • Press the button and watch the chart go
  • To save an image just press save image at anytime, the file will be saved in the application folder

Series format

The series are generated based on a csv with the following format:

< Index >|< title 1 >,< Index >|< title 2 >

Index is the position on the csv stream that Y axes data is and the title of the Series.

Example:

csv stream -> 123,340

series format string -> 0|Sensor A, 1|Sensor B

Result:

Series 1 title = Sensor A

Serias 1 Y Axes value = 123

Series 2 title = Sensor B

Serias 2 Y Axes value = 340