EasyManuals Logo

Arduino uno User Manual

Arduino uno
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #159 background imageLoading...
Page #159 background image
Figure 25You can find good online editors for pixel graphics.
When ImageMagick is available on your system, you can install the rmagick
library using the following command:
maik> gem install rmagick
Now you can use rmagick in your Ruby programs. Well use it to convert a
graphics file into a C++ file:
Video/img2cpp.rb
require 'RMagick'
Line 1
include Magick
-
-
image = Image::read(ARGV[0]).first
-
5
puts '#include "thermometer.h"'
-
puts 'PROGMEM const unsigned char thermometer[] = {'
-
puts " #{image.columns}, #{image.rows},"
-
-
(0..image.rows).each do |y|
10
print ' B'
-
(0..image.columns).each do |x|
-
pixel = image.pixel_color(x, y)
-
print pixel.red == 0 ? '0' : '1'
-
print ', B' if (x + 1) % 8 == 0
15
Chapter 8. Generating Video Signals with an Arduino 142
report erratum discuss
www.it-ebooks.info

Table of Contents

Other manuals for Arduino uno

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino uno and is the answer not in the manual?

Arduino uno Specifications

General IconGeneral
Form factorArduino
CertificationRoHS, FC, CE
Processor model-
Processor frequency- MHz
Microcontroller modelATmega328
Microcontroller frequency16 MHz
DC input voltage7-12 V
Operating voltage5 V
DC current per I/O pin40 mA
Flash memory0.032 MB
Maximum internal memory- GB
SRAM (Static Random Access Memory)2 KB
EEPROM (Electrically Erasable Programmable Read-Only Memory)1 KB
Wi-FiNo
Number of analog I/O pins6
Number of digital I/O pins14
Weight and Dimensions IconWeight and Dimensions
Board dimensions53.4 x 68.6 mm

Related product manuals