Quantcast
Channel: ArduinoDev.com
Viewing all 77 articles
Browse latest View live

Arduino SD card picture viewer with TFT LCD shield

$
0
0

IMG_2687

I just started to play with TFT LCD screen with Arduino. I used Itead 2.8″ TFT shield which is said to work great with UTFT library. Taking into account that Arduino has too limited Flash to hold a full frame of picture, and that the shield has a SD card socket on the back, I decided to make a SD card picture viewer as my first approach.

The 8-bit AVR-based Arduino has not only limited storage but also limited computation power. It is impossible to decode JPEG or PNG on-the-fly with Arduino, nor is it possible to load a whole bitmap from SD card into SRAM. The image files have to be stored in raw data format and loaded and rendered portion by portion. The native data format of the TFT control chip is RGB565 (2 bytes for a pixel, 5 bits for red, 6 bits for green, 5 bis for blue). So I used MediaCoder, which is a universal media transcoder I developed, to generate the raw image data of RGB565. It can also convert video files to a sequence of image files.

You can get MediaCoder here for free. After the software is launched, click Add button to add your image or video files, or simply drag them into to the program window. To make MediaCoder generate image files, change the “Format” to “Image” on Video tab. By default, JPEG is the output format and this can be changed to “Raw” on the right side.

 

There is one more option to change and it is important. As our TFT shield likes to eat 16-bit RGB565 data, we need to change the colorspace to RGB565.

Finally, set an output folder and click the Start button to kick the conversion off. When converting video file, a sequence of image files will be generated in a specified interval and you can adjust the interval or specify the number of images you want to get for each video file.

After conversion is accomplished, you will get a bunch of .RAW files in the output folder. Now plug in the SD card to your computer, create a PICTURE folder on it and copy the generated files to the folder.

sd_picture_files

 

Now comes the Arduino part, all we need to do is uploading the sketch I wrote to Arduino, mounting the shield, inserting the SD card. Sit back and watch your pictures showing one by one on Arduino.

IMG_2677

IMG_2686


Cheers on the all new Arduino Yún!

$
0
0

Finally Arduino combies with Linux. The name is also brilliant! Yún(云) means cloud in Chinese language and that indiciates this Arduino goes up to the cloud, with either WIFI or RJ45. There is USB host and MicroSD socket onboard too.
Arduino Yún
Arduino_YunCheck out more details on Arduino Blog.

 

New OLED UI for OBD/GPS data logger

$
0
0

 

The display of OBD-II logger is done with MultiLCD, a library I wrote for simplify displaying texts on different LCD/OLED units. So this is a good demo for the library. The code will be committed to Github soon.

IMG_2823

Introducing the OBD-II UART Adapter for Arduino (with built-in MPU-6050)

$
0
0

obd_adapter_acc_gyroThe OBD-II UART Adapter for Arduino works as a data bridge between a vehicle’s OBD-II port and serial UART port of Arduino, used for reading out data such as speed or engine RPM from car’s ECU computer. With dedicated Arduino library, it is extremely simple to perform a readout on Arduino. The adapter embeds a MPU-6050 accelerometer/gyro/temperature sensor module inside with I2C interface. The accelerometer can be used for measuring car’s acceleration and steering G-force. The gyroscope can be used for measuing car’s orientation without GPS.

Besides providing OBD-II data access, it also outpus DC 5V power supply (converted and regulated from OBD-II port) for Arduino and the attached devices.

The adapter has a standard OBD-II connector which can be plugged and locked in the OBD-II port usually under the dashboard of your car. A cable comes out from the adapter and splits into 3 connectors at the end, which are power connector (VCC/GND), OBD-II data connector (Rx/Tx) and I2C sensor connector (SDA/SCL). They can be connected to Arduino with onboard breakout pins or breakout shield. Your Arduino device will look tidy in car with only one connected cable.

The OBD-II Port Plugged OBD-II Adapter OBD-II adapter output connectors P1050376

Links

Arduino connected with iPad via BLE

$
0
0

Arduino communicating with iPadI am so excited that this is finally. Arduino can now exchanging data with iPad or iPhone with a low-cost BLE (Bluetooth Low-Energy) module in an state-of-art way, no jail-break, no trivial device pairing. The data channel is established seconds after an App is launched.

This technique will be so useful for the development of my Arduino-based OBD-II and GPS data logger which is accessible with iOS devices.

 

Arduino MEGA 2560 and TFT LCD shiled making up the new kit

$
0
0

The Arduino OBD-II logger kit #3 based on an Arduino MEGA2560 will soon get upgraded. The LCD1602 in the previous kit will be replaced by a 2.8″ TFT LCD shield. The new kit also includes a new I/O breakout shield for MEGA2560 which provides four 4-pin UART ports and one 4-pin I2C port on the side of the board, so that it is easier to connect the OBD-II UART adapter model B to Arduino.

To match up the upgrade in hardware, the software is also being improved. With the new MEGA logger sketch, the new kit can be used to display more information from the car in a more fancy way.

IMG_2969 IMG_2974IMG_3103 IMG_3110

The new kit can be order here.

OBD/GPS/BLE/microSD Expansion Shield for Arduino

$
0
0

Here comes something exciting and exclusive, an Arduino shield for Arduino UNO/Leonardo as well as MEGA 2560 (compact size). The shield features:

  • 4-pin serial UART socket (GND,VCC,Tx,Rx) x 2
  • 4-pin I2C sockets (GND,VCC,SDA,SCL) x 2
  • 3-pin igital I/O x 2
  • 3-pin analog I/O x 4
  • MicroSD/TF socket
  • BLE (Bluetooth Low-Energy) or Bluetooth 2.1 module
  • Stacking additional shields

When using with Arduino MEGA 2560 Compact, the serial UART sockets are wired to Serial1 (for OBD-II) and Serial2 (for GPS). The shield can be a best-fit for using Arduino with OBD-II UART adapter as well as GPS receiver. With the MicroSD/TF socket, data can be logged. With the BLE module, data can be live transmitted to an iPhone or iPad.

freematics_shield_v2_4 freematics_shield_v2_6

freematics_shield_v2_2 freematics_shield_v2_1

The shield can be stacked with additional shield, e.g. TFT LCD shield, to form a device with display. Running the MEGA Logger sketch, the device could look like this working in the car:

DSC00885 DSC00900 DSC00894 DSC00904

This shield will soon available for order. Please stay tuned.

Arduino on bike with GPS and BLE

$
0
0

I managed to find out an easy way to attach an Arduino (Microduino) to my bike, connected with 5Hz GPS module and a batter pack. Everything is now ready for GPS logging, speed meter, odometer and BLE connectivity.

Arduino on bike


Bigger font for OLED module

$
0
0

Some OLED module users suggest me adding a bigger font to MultiLCD library, as the 0.96″ SSD1306 based module is kind of tiny-teeny. Here comes the new 16×24 pixels font (digits only).

odometer

To use it, please update your library and set the font in your code like this:

lcd.setFont(FONT_SIZE_XLARGE);

Data Logger Shield first batch of production completed

$
0
0

The first batch of mass production of the Data Logger Shield for Arduino has just completed. It’s part of the Project Freematics, so you will see the project LOGO on the back side of the shield.

data_logger_shield_back

Learn more about this shield

Arduino SD card picture viewer with TFT LCD shield

$
0
0

IMG_2687

I just started to play with TFT LCD screen with Arduino. I used Itead 2.8″ TFT shield which is said to work great with UTFT library. Taking into account that Arduino has too limited Flash to hold a full frame of picture, and that the shield has a SD card socket on the back, I decided to make a SD card picture viewer as my first approach.

The 8-bit AVR-based Arduino has not only limited storage but also limited computation power. It is impossible to decode JPEG or PNG on-the-fly with Arduino, nor is it possible to load a whole bitmap from SD card into SRAM. The image files have to be stored in raw data format and loaded and rendered portion by portion. The native data format of the TFT control chip is RGB565 (2 bytes for a pixel, 5 bits for red, 6 bits for green, 5 bis for blue). So I used MediaCoder, which is a universal media transcoder I developed, to generate the raw image data of RGB565. It can also convert video files to a sequence of image files.

You can get MediaCoder here for free. After the software is launched, click Add button to add your image or video files, or simply drag them into to the program window. To make MediaCoder generate image files, change the “Format” to “Image” on Video tab. By default, JPEG is the output format and this can be changed to “Raw” on the right side.

 

There is one more option to change and it is important. As our TFT shield likes to eat 16-bit RGB565 data, we need to change the colorspace to RGB565.

Finally, set an output folder and click the Start button to kick the conversion off. When converting video file, a sequence of image files will be generated in a specified interval and you can adjust the interval or specify the number of images you want to get for each video file.

After conversion is accomplished, you will get a bunch of .RAW files in the output folder. Now plug in the SD card to your computer, create a PICTURE folder on it and copy the generated files to the folder.

sd_picture_files

 

Now comes the Arduino part, all we need to do is uploading the sketch I wrote to Arduino, mounting the shield, inserting the SD card. Sit back and watch your pictures showing one by one on Arduino.

IMG_2677

IMG_2686

Get free Data Logger Shield with OBD-II Adapter

$
0
0

As a promotion, orders of OBD-II Adapter will include a free Data Logger Shield (without onboard BT module). The shield makes it easier to connect the OBD-II Adapter to Arduino with 4-pin XH-2.54 connector. For Model B, I2C connector can also be easily plugged in. Besides, the microSD/TF socket on the shield provides easy-to-access mass-storage for Arduino. For more information and ordering, please refer to OBD-II Adapter product page. Remember to change the “Include Free Shield” option to “Yes” when ordering.

The following picture shows the shield connected with OBD-II Adapter (Model B), GPS receiver and I2C OLED display.

IMG_3848

Stacked on Arduino UNO Arduino UNO and Data Logger Shield OBD-II Adapter connected via Data Logger Shield

New MicroLCD library for SSD1306 OLED display

$
0
0

MicroLCD is a dedicated library for SSD1306 based OLED display, with the same API as MultiLCD library, but consumes less program memory. Also only 4 files are required, so it is more handy to include in the sketch directory.

I2C OLED connected via I2C socket

The source code of the library and example is here.

LED matrix module with right size and brightness

$
0
0

Finally there is a I2C LED matrix module with bright enough pixels and right size (30x30cm). OBD-II HUD display will come alive soon.

IMG_3870

My previous attempt to make a HUD display is here. That unit was too big for cascading together to display multiple digits and also a bit high in cost. Now this seems to be a better one.

The ultimate OBD-II adapter with Arduino integrated

$
0
0

This is definitely going to be something awesome, an OBD-II adapter with Arduino integrated onboard! More details will be disclosed later.

IMG_3873


CAN BUS Simulator

$
0
0

This is the prototype of a CAN BUS simulator, with OBD-II port identical to a real car. With it, testing of OBD-II adapter and applications will be a lot easier. No need to stay in car for hours and it is also fuel saving.

CAN BUS simulator

Poster for the World Maker Faire

Open-source Performance Box with Arduino

$
0
0

One of my goal is making an open-source version of Performance Box. With the help of my just developed OBD-II simulator, I have made it today. The time of a car’s acceleration from static to 60/100/200km/h can be measured with Arduino connected with OBD-II and GPS. I will further improve the algorithm to increase the accuracy. As this will be open-source, everyone can see how it works and judge the results.

Current it works like this:

  • When car is static, read OBD-II car speed data (PID 010D) continuously
  • When detecting speed changes to non-zero, keep start time (in ms)
  • Speed, RPM and GPS data is logged to microSD card during the procedure and can be used to generate charts and for further analysis
  • When either GPS speed or OBD-II speed reaches thresholds (60, 100 and 200 km/h), keep the time and display the elapsed time
  • When elapsed time past 99 seconds or speed overpass 200 km/h, the procedure ends

The source code is based on current OBD Logger and will be published soon.

arduino_pbox1 arduino_pbox2

 

Almost ready for New York!

Delay of shipping

$
0
0

As I am already on my way to New York for the World Maker Faire, the shipping of some orders will be delayed. I am really sorry for this. I will process all the orders immediately when I get back on Sept. 27. Hope you guys can wait for me.

Viewing all 77 articles
Browse latest View live