SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Hardware Open Source
Tiago Maluta
16 de outubro de 2009
Tiago Maluta Hardware Open Source
Hardware Open Source
Desenvolvido no mesmo modelo do FOSS1
Refere-se a informa¸c˜ao sobre o design
Esquemas
Lista de Materiais (BOM)
PCB layout
Hardware Description Language (HDL)
FPGA (Xilinx, Altera, ...)
Comum entre hobistas (DIY)
1
Free and Open Source Software
Tiago Maluta Hardware Open Source
Colabora¸c~ao
"Hardware engineers do the same thing as software
engineers: they use high-level design patterns.
They memorize circuits for accomplishing certain
things and then plug them together."
Tiago Maluta Hardware Open Source
Como um hardware pode ser ”open”?
1 Acesso a informa¸c˜ao sobre como hardware funciona, para ser
usado livremente.
2 O design deve ser p´ublico, para que outros implementem e
aprendam a partir do projeto.
3 As ferramentas utilizadas na constru¸c˜ao do hardware devem
ser dispon´ıveis, para outros desenvolverem e alterarem o
design.
Tiago Maluta Hardware Open Source
Casos de sucesso
Arduino
www.arduinio.cc
BeagleBoard
www.beagleboard.org
Gumstix
www.gumstix.com
Tiago Maluta Hardware Open Source
Prot´otipo
http://www.flickr.com/photos/justinmclean/3846230883/in/set-72157622114963090/
Tiago Maluta Hardware Open Source
Design
Software
Electronic Design Automation (EDA)
Esquematico, PCB, simula¸c˜ao
Exemplos:
Eagle
http://www.cadsoft.de/
gEDA
http://www.gpleda.org/
Fritzing
http://fritzing.org/
KiCad
http://kicad.sf.net
Tiago Maluta Hardware Open Source
Printed Circuit Board (PCB)
Tiago Maluta Hardware Open Source
Como facilitar?
1 Prototipagem r´apida
2 Hardware em camadas
3 Desenvolvimento acess´ıvel
4 Bibliotecas de Software
Tiago Maluta Hardware Open Source
Arduino
Plataforma open-source flex´ıvel
As vers˜oes mais populares utilizam microcontrolador de 8-bits da ATMEL (ATMega)
Focado na cria¸c˜ao de objetos interativos
Bem documentado
http://www.arduino.cc/
Aprox. US$ 35.00
Hardware em camadas (Wiishield, Ethernet, Bluetooth, GPS,
etc)
Alimenta¸c˜ao pela USB (5V)
Tiago Maluta Hardware Open Source
Compilador: AVR toolchain
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-gccbug
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-gcov
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-gcc-4.4.1
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-c++
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-g++
/usr/i686-pc-linux-gnu/avr/gcc-bin/4.4.1/avr-cpp
Tiago Maluta Hardware Open Source
Programa¸c˜ao
Ambiente de desenvolvimento integrado (IDE) (Windows/Linux/OSX)
Processing
Arduino Programming Language
Baseado na linguagem C/C++
Sketch ´e o nome dado a um programa no Arduino
Grava¸c˜ao pela USB2
2
N˜ao s˜ao todos os modelos
Tiago Maluta Hardware Open Source
Arduino Programming Language
Dividido em trˆes partes principais.
Estrutural
Valores
Fun¸c˜oes
Tiago Maluta Hardware Open Source
Estrutural
void setup()
Executado apenas uma vez
Inicializa¸c˜ao
void loop()
Executada repetida vezes
”Cora¸c˜ao”do scketch
if
if...else
for
switch case
while
do...while
break
continue
return
Tiago Maluta Hardware Open Source
Valores
Tipos:
boolean (true ou false)
char (8 bits)
byte (8 bits)
int (2 bytes)
unsigned int (2 bytes)
long (4 bytes)
unsigned long (4
bytes)
float (4 bytes)
double (=float)
array ([])
string (array + ’0’)
void (somente na
declara¸c˜ao de fun¸c˜oes)
Convers˜ao:
char()
byte()
int()
long()
float()
Constantes
HIGH | LOW
INPUT | OUTPUT
true | false
Integer constants
decimal (11)
bin´ario (B1011)
hex (0xB)
octal (013)
Floating point constants
3.14E5
(3.14 x 10∧5)
25e-6
(0.000025)
Formatadores U & L
long
1000l
unsigned
1000u
unsigned long
1000ul
Tiago Maluta Hardware Open Source
Fun¸c˜oes
Digital I/O
pinMode(pin,mode)
digitalWrite(pin, value)
int digitalRead(pin)
Analog I/O
int analogRead(pin)
analogWrite(pin,value)
Time
unsigned long millis()
unsigned long micros()
delay(ms)
delayMicroseconds(us)
Math
min(x,y)
max(x,y)
abs(x)
constrain(x,a,b)
map(value, fromLow,
fromHigh, toLow, toHigh)
pow(base, exponent)
sq(x)
sqrt(x)
Trigonometry
sin(rad)
cos(rad)
tan(rad)
Random Numbers
randomSeed(seed)
long random(max)
random(min,max)
Communication
Serial
Tiago Maluta Hardware Open Source
Hello World
void setup(){
pinMode(13, OUTPUT);
}
void loop(){
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
Tiago Maluta Hardware Open Source
Cora¸c˜ao do Arduino: Arquitetura AVR
I/O Memory Adderess
Data Direction Register
(DDRx)
Data (PORTx)
Port Input Pins (PINx)
Harvard architecture
Tiago Maluta Hardware Open Source
Projetos
Conhecer os protocolos de comunica¸c˜ao.
I2C, SPI, UART (RS232)
Acesso a documenta¸c˜ao to microcontrolador
ATMega168 ou ATMega328 http://www.msarnoff.org/chipdb/ATmega168
Tiago Maluta Hardware Open Source
Projeto #1: LCD Display
http://www.flickr.com/photos/maluta/3804133584/in/set-72157621867976757/
Tiago Maluta Hardware Open Source
Projeto #1: LCD Display
2x16 LCD (Hitachi HD44780)
Register Select (RS)
Read/Write (R/W)
Enable
8x Data
Display Constrast
Power supply
Backlight
Tiago Maluta Hardware Open Source
LCD pin Arduino
RS → digital pin 12
Enable → digital pin 11
D4 → digital pin 5
D5 → digital pin 4
D6 → digital pin 3
D7 → digital pin 2
Tiago Maluta Hardware Open Source
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD’s number of rows and columns:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}
Tiago Maluta Hardware Open Source
Projeto #2: Webserver
http://www.flickr.com/photos/maluta/4015803466/in/set-72157621867976757/
Tiago Maluta Hardware Open Source
Projeto #2: Webserver
Ethershield
Utiliza um chip dedicado da Microchip (ENC28J60)
Stand-Alone Ethernet Controller with SPI Interface
http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022889
O modelo ”oficial”utiliza o chip da Wiznet (W5100)
http://www.wiznet.co.kr/en/pro02.php?&ss%5B2%5D=1&page=1&num=25
Tiago Maluta Hardware Open Source
#include "etherShield.h"
static uint8 t mymac[6] = {
0x54,0x55,0x58,0x10,0x00,0x24};
static uint8 t myip[4] = {
10,0,0,25};
#define MYWWWPORT 80
#define BUFFER SIZE 550
static uint8 t buf[BUFFER SIZE+1];
EtherShield es = EtherShield();
Tiago Maluta Hardware Open Source
uint16 t http200ok(void)
{
return(es.ES fill tcp data p(buf,0,PSTR("HTTP/1.0 200 OKrnContent-Type:
text/htmlrnPragma: no-cachernrn")));
}
// prepare the webpage by writing the data to the tcp send buffer
uint16 t print webpage(uint8 t ∗buf)
{
uint16 t plen;
plen=http200ok();
plen=es.ES fill tcp data p(buf,plen,PSTR("<html><head><title>Arduino ENC28J60 Ethernet Shield
V1.0</title></head><body>"));
plen=es.ES fill tcp data p(buf,plen,PSTR("<center><h1>Hardware Open Source</h1>"));
plen=es.ES fill tcp data p(buf,plen,PSTR("<hr><br><h2><font color=’’blue’’>-- EMSL’09 --
<br>Encontro Mineiro de Software Livre"));
plen=es.ES fill tcp data p(buf,plen,PSTR("<br> "));
plen=es.ES fill tcp data p(buf,plen,PSTR("<br> "));
plen=es.ES fill tcp data p(buf,plen,PSTR("<br></font></h2>") );
plen=es.ES fill tcp data p(buf,plen,PSTR("</center><hr>"));
plen=es.ES fill tcp data p(buf,plen,PSTR("Tiago Maluta maluta@unifei.edu.br "));
plen=es.ES fill tcp data p(buf,plen,PSTR("<a
href=’’http://www.coding.com.br’’>www.coding.com.br</a>"));
plen=es.ES fill tcp data p(buf,plen,PSTR("</body></html>"));
return(plen);
}
Tiago Maluta Hardware Open Source
void setup(){
// initialize enc28j60
es.ES enc28j60Init(mymac);
// init the ethernet/ip layer:
es.ES init ip arp udp tcp(mymac,myip, MYWWWPORT);
}
Tiago Maluta Hardware Open Source
void loop(){
uint16 t plen, dat p;
while(1) {
// read packet, handle ping and wait for a tcp packet:
dat p=es.ES packetloop icmp tcp(buf,es.ES enc28j60PacketReceive(BUFFER SIZE, buf));
/∗ dat p will be unequal to zero if there is a valid
∗ http get ∗/
if(dat p==0){
// no http request
continue;
}
// tcp port 80 begin
if (strncmp("GET ",(char ∗)&(buf[dat p]),4)!=0){
// head, post and other methods:
dat p=http200ok();
dat p=es.ES fill tcp data p(buf,dat p,PSTR("<h1>200 OK</h1>"));
goto SENDTCP;
}
// just one web page in the "root directory" of the web server
if (strncmp("/ ",(char ∗)&(buf[dat p+4]),2)==0){
dat p=print webpage(buf);
goto SENDTCP;
}
else{
dat p=es.ES fill tcp data p(buf,0,PSTR("HTTP/1.0 401 UnauthorizedrnContent-Type:
text/htmlrnrn<h1>401 Unauthorized</h1>"));
goto SENDTCP;
}
SENDTCP:
es.ES www server reply(buf,dat p); // send web page data
}
Tiago Maluta Hardware Open Source
Outros projetos
Twitter
Pain´eis Solares
Sintetizador de som
GPS
Sensores (Umidade, Luz, etc)
Compartilhamento atrav´es do Pachube
(http://community.pachube.com/)
Tiago Maluta Hardware Open Source
Considera¸c˜oes
Consumo el´etrico
Custo (R$)
Documenta¸c˜ao
Esquem´atico
BOM
PCB
Propriedade Intelectual
Licen¸ca Compat´ıvel
Sugest˜ao: Creative Commons
Comunidade de Usu´arios
Tiago Maluta Hardware Open Source
Referˆencias
http://del.icio.us.com/maluta/arduino
http://www.coding.com.br
Tiago Maluta Hardware Open Source

Contenu connexe

Tendances

Penetration testing using python
Penetration testing using pythonPenetration testing using python
Penetration testing using pythonPurna Chander K
 
pa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text Processingpa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text ProcessingRodrigo Senra
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]RootedCON
 
penetration testing - black box type.
penetration testing - black box type.penetration testing - black box type.
penetration testing - black box type.luigi capuzzello
 
Poker, packets, pipes and Python
Poker, packets, pipes and PythonPoker, packets, pipes and Python
Poker, packets, pipes and PythonRoger Barnes
 
Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Mr. Vengineer
 
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)CODE BLUE
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentOOO "Program Verification Systems"
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)Pixie Labs
 
Linux Shellcode disassembling
Linux Shellcode disassemblingLinux Shellcode disassembling
Linux Shellcode disassemblingHarsh Daftary
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20DefconRussia
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughterQuinn Wilton
 
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxИщем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxPositive Hack Days
 
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)Yogi Sharo
 

Tendances (20)

Scratch pcduino
Scratch pcduinoScratch pcduino
Scratch pcduino
 
Отладка в GDB
Отладка в GDBОтладка в GDB
Отладка в GDB
 
Pycon Sec
Pycon SecPycon Sec
Pycon Sec
 
Penetration testing using python
Penetration testing using pythonPenetration testing using python
Penetration testing using python
 
pa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text Processingpa-pe-pi-po-pure Python Text Processing
pa-pe-pi-po-pure Python Text Processing
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
Ilfak Guilfanov - Decompiler internals: Microcode [rooted2018]
 
penetration testing - black box type.
penetration testing - black box type.penetration testing - black box type.
penetration testing - black box type.
 
Poker, packets, pipes and Python
Poker, packets, pipes and PythonPoker, packets, pipes and Python
Poker, packets, pipes and Python
 
Python build your security tools.pdf
Python build your security tools.pdfPython build your security tools.pdf
Python build your security tools.pdf
 
Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会Facebook Glow Compiler のソースコードをグダグダ語る会
Facebook Glow Compiler のソースコードをグダグダ語る会
 
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)
various tricks for remote linux exploits  by Seok-Ha Lee (wh1ant)
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
PVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications developmentPVS-Studio, a solution for resource intensive applications development
PVS-Studio, a solution for resource intensive applications development
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
 
Linux Shellcode disassembling
Linux Shellcode disassemblingLinux Shellcode disassembling
Linux Shellcode disassembling
 
Zn task - defcon russia 20
Zn task  - defcon russia 20Zn task  - defcon russia 20
Zn task - defcon russia 20
 
Software to the slaughter
Software to the slaughterSoftware to the slaughter
Software to the slaughter
 
Ищем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре LinuxИщем уязвимости нулевого дня в ядре Linux
Ищем уязвимости нулевого дня в ядре Linux
 
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)
[Gary entsminger] turbo_pascal_for_windows_bible(book_fi.org)
 

Similaire à Hardware Open Source

Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game Pritam Samanta
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008guestd9065
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -evechiportal
 
44 con slides (1)
44 con slides (1)44 con slides (1)
44 con slides (1)geeksec80
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Windows Developer
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Itzik Kotler
 
C Under Linux
C Under LinuxC Under Linux
C Under Linuxmohan43u
 
Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10stemplar
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin敬倫 林
 
Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++Fernando Moreira
 
Let's Take A Look At The Boost Libraries
Let's Take A Look At The Boost LibrariesLet's Take A Look At The Boost Libraries
Let's Take A Look At The Boost LibrariesThomas Pollak
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applicationshubx
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...Christoph Matthies
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory AnalysisMoabi.com
 
Open Source Robotics as Booster to Creativity
Open Source Robotics as  Booster to CreativityOpen Source Robotics as  Booster to Creativity
Open Source Robotics as Booster to CreativityCarlos J. Costa
 

Similaire à Hardware Open Source (20)

Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game Computer Project For Class XII Topic - The Snake Game
Computer Project For Class XII Topic - The Snake Game
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008
 
Track c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eveTrack c-High speed transaction-based hw-sw coverification -eve
Track c-High speed transaction-based hw-sw coverification -eve
 
44 con slides (1)
44 con slides (1)44 con slides (1)
44 con slides (1)
 
What is Python?
What is Python?What is Python?
What is Python?
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
C Under Linux
C Under LinuxC Under Linux
C Under Linux
 
Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10Ardx eg-spar-web-rev10
Ardx eg-spar-web-rev10
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
 
Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++Go Native : Squeeze the juice out of your 64-bit processor using C++
Go Native : Squeeze the juice out of your 64-bit processor using C++
 
Let's Take A Look At The Boost Libraries
Let's Take A Look At The Boost LibrariesLet's Take A Look At The Boost Libraries
Let's Take A Look At The Boost Libraries
 
How to reverse engineer Android applications
How to reverse engineer Android applicationsHow to reverse engineer Android applications
How to reverse engineer Android applications
 
How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...How to reverse engineer Android applications—using a popular word game as an ...
How to reverse engineer Android applications—using a popular word game as an ...
 
Quiz 9
Quiz 9Quiz 9
Quiz 9
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
 
Open Source Robotics as Booster to Creativity
Open Source Robotics as  Booster to CreativityOpen Source Robotics as  Booster to Creativity
Open Source Robotics as Booster to Creativity
 
Socket.io (part 1)
Socket.io (part 1)Socket.io (part 1)
Socket.io (part 1)
 

Plus de Tiago Maluta

Internet e o Genero Textual
Internet e o Genero TextualInternet e o Genero Textual
Internet e o Genero TextualTiago Maluta
 
Consideracoes sobre Ética e Computação
Consideracoes sobre Ética e ComputaçãoConsideracoes sobre Ética e Computação
Consideracoes sobre Ética e ComputaçãoTiago Maluta
 
A internet colaborativa e o Software Livre
A internet colaborativa e o Software LivreA internet colaborativa e o Software Livre
A internet colaborativa e o Software LivreTiago Maluta
 

Plus de Tiago Maluta (6)

Leite de Soja
Leite de SojaLeite de Soja
Leite de Soja
 
td
tdtd
td
 
Calourada2010
Calourada2010Calourada2010
Calourada2010
 
Internet e o Genero Textual
Internet e o Genero TextualInternet e o Genero Textual
Internet e o Genero Textual
 
Consideracoes sobre Ética e Computação
Consideracoes sobre Ética e ComputaçãoConsideracoes sobre Ética e Computação
Consideracoes sobre Ética e Computação
 
A internet colaborativa e o Software Livre
A internet colaborativa e o Software LivreA internet colaborativa e o Software Livre
A internet colaborativa e o Software Livre
 

Dernier

The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceanilsa9823
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceanilsa9823
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)Delhi Call girls
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)Delhi Call girls
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girlsPooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceanilsa9823
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theorydrae5
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666nishakur201
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morvikas rana
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..nishakur201
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfnoumannajam04
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 

Dernier (20)

The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Jankipuram Lucknow best sexual service
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Mahanagar Lucknow best sexual service
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Rajajipuram Lucknow best sexual service
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..call girls in candolim beach 9870370636] NORTH GOA ..
call girls in candolim beach 9870370636] NORTH GOA ..
 
Introducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdfIntroducing to billionaire brain wave.pdf
Introducing to billionaire brain wave.pdf
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 

Hardware Open Source

  • 1. Hardware Open Source Tiago Maluta 16 de outubro de 2009 Tiago Maluta Hardware Open Source
  • 2. Hardware Open Source Desenvolvido no mesmo modelo do FOSS1 Refere-se a informa¸c˜ao sobre o design Esquemas Lista de Materiais (BOM) PCB layout Hardware Description Language (HDL) FPGA (Xilinx, Altera, ...) Comum entre hobistas (DIY) 1 Free and Open Source Software Tiago Maluta Hardware Open Source
  • 3. Colabora¸c~ao "Hardware engineers do the same thing as software engineers: they use high-level design patterns. They memorize circuits for accomplishing certain things and then plug them together." Tiago Maluta Hardware Open Source
  • 4. Como um hardware pode ser ”open”? 1 Acesso a informa¸c˜ao sobre como hardware funciona, para ser usado livremente. 2 O design deve ser p´ublico, para que outros implementem e aprendam a partir do projeto. 3 As ferramentas utilizadas na constru¸c˜ao do hardware devem ser dispon´ıveis, para outros desenvolverem e alterarem o design. Tiago Maluta Hardware Open Source
  • 7. Design Software Electronic Design Automation (EDA) Esquematico, PCB, simula¸c˜ao Exemplos: Eagle http://www.cadsoft.de/ gEDA http://www.gpleda.org/ Fritzing http://fritzing.org/ KiCad http://kicad.sf.net Tiago Maluta Hardware Open Source
  • 8. Printed Circuit Board (PCB) Tiago Maluta Hardware Open Source
  • 9. Como facilitar? 1 Prototipagem r´apida 2 Hardware em camadas 3 Desenvolvimento acess´ıvel 4 Bibliotecas de Software Tiago Maluta Hardware Open Source
  • 10. Arduino Plataforma open-source flex´ıvel As vers˜oes mais populares utilizam microcontrolador de 8-bits da ATMEL (ATMega) Focado na cria¸c˜ao de objetos interativos Bem documentado http://www.arduino.cc/ Aprox. US$ 35.00 Hardware em camadas (Wiishield, Ethernet, Bluetooth, GPS, etc) Alimenta¸c˜ao pela USB (5V) Tiago Maluta Hardware Open Source
  • 12. Programa¸c˜ao Ambiente de desenvolvimento integrado (IDE) (Windows/Linux/OSX) Processing Arduino Programming Language Baseado na linguagem C/C++ Sketch ´e o nome dado a um programa no Arduino Grava¸c˜ao pela USB2 2 N˜ao s˜ao todos os modelos Tiago Maluta Hardware Open Source
  • 13. Arduino Programming Language Dividido em trˆes partes principais. Estrutural Valores Fun¸c˜oes Tiago Maluta Hardware Open Source
  • 14. Estrutural void setup() Executado apenas uma vez Inicializa¸c˜ao void loop() Executada repetida vezes ”Cora¸c˜ao”do scketch if if...else for switch case while do...while break continue return Tiago Maluta Hardware Open Source
  • 15. Valores Tipos: boolean (true ou false) char (8 bits) byte (8 bits) int (2 bytes) unsigned int (2 bytes) long (4 bytes) unsigned long (4 bytes) float (4 bytes) double (=float) array ([]) string (array + ’0’) void (somente na declara¸c˜ao de fun¸c˜oes) Convers˜ao: char() byte() int() long() float() Constantes HIGH | LOW INPUT | OUTPUT true | false Integer constants decimal (11) bin´ario (B1011) hex (0xB) octal (013) Floating point constants 3.14E5 (3.14 x 10∧5) 25e-6 (0.000025) Formatadores U & L long 1000l unsigned 1000u unsigned long 1000ul Tiago Maluta Hardware Open Source
  • 16. Fun¸c˜oes Digital I/O pinMode(pin,mode) digitalWrite(pin, value) int digitalRead(pin) Analog I/O int analogRead(pin) analogWrite(pin,value) Time unsigned long millis() unsigned long micros() delay(ms) delayMicroseconds(us) Math min(x,y) max(x,y) abs(x) constrain(x,a,b) map(value, fromLow, fromHigh, toLow, toHigh) pow(base, exponent) sq(x) sqrt(x) Trigonometry sin(rad) cos(rad) tan(rad) Random Numbers randomSeed(seed) long random(max) random(min,max) Communication Serial Tiago Maluta Hardware Open Source
  • 17. Hello World void setup(){ pinMode(13, OUTPUT); } void loop(){ digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500); } Tiago Maluta Hardware Open Source
  • 18. Cora¸c˜ao do Arduino: Arquitetura AVR I/O Memory Adderess Data Direction Register (DDRx) Data (PORTx) Port Input Pins (PINx) Harvard architecture Tiago Maluta Hardware Open Source
  • 19. Projetos Conhecer os protocolos de comunica¸c˜ao. I2C, SPI, UART (RS232) Acesso a documenta¸c˜ao to microcontrolador ATMega168 ou ATMega328 http://www.msarnoff.org/chipdb/ATmega168 Tiago Maluta Hardware Open Source
  • 20. Projeto #1: LCD Display http://www.flickr.com/photos/maluta/3804133584/in/set-72157621867976757/ Tiago Maluta Hardware Open Source
  • 21. Projeto #1: LCD Display 2x16 LCD (Hitachi HD44780) Register Select (RS) Read/Write (R/W) Enable 8x Data Display Constrast Power supply Backlight Tiago Maluta Hardware Open Source
  • 22. LCD pin Arduino RS → digital pin 12 Enable → digital pin 11 D4 → digital pin 5 D5 → digital pin 4 D6 → digital pin 3 D7 → digital pin 2 Tiago Maluta Hardware Open Source
  • 23. #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD’s number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis()/1000); } Tiago Maluta Hardware Open Source
  • 25. Projeto #2: Webserver Ethershield Utiliza um chip dedicado da Microchip (ENC28J60) Stand-Alone Ethernet Controller with SPI Interface http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022889 O modelo ”oficial”utiliza o chip da Wiznet (W5100) http://www.wiznet.co.kr/en/pro02.php?&ss%5B2%5D=1&page=1&num=25 Tiago Maluta Hardware Open Source
  • 26. #include "etherShield.h" static uint8 t mymac[6] = { 0x54,0x55,0x58,0x10,0x00,0x24}; static uint8 t myip[4] = { 10,0,0,25}; #define MYWWWPORT 80 #define BUFFER SIZE 550 static uint8 t buf[BUFFER SIZE+1]; EtherShield es = EtherShield(); Tiago Maluta Hardware Open Source
  • 27. uint16 t http200ok(void) { return(es.ES fill tcp data p(buf,0,PSTR("HTTP/1.0 200 OKrnContent-Type: text/htmlrnPragma: no-cachernrn"))); } // prepare the webpage by writing the data to the tcp send buffer uint16 t print webpage(uint8 t ∗buf) { uint16 t plen; plen=http200ok(); plen=es.ES fill tcp data p(buf,plen,PSTR("<html><head><title>Arduino ENC28J60 Ethernet Shield V1.0</title></head><body>")); plen=es.ES fill tcp data p(buf,plen,PSTR("<center><h1>Hardware Open Source</h1>")); plen=es.ES fill tcp data p(buf,plen,PSTR("<hr><br><h2><font color=’’blue’’>-- EMSL’09 -- <br>Encontro Mineiro de Software Livre")); plen=es.ES fill tcp data p(buf,plen,PSTR("<br> ")); plen=es.ES fill tcp data p(buf,plen,PSTR("<br> ")); plen=es.ES fill tcp data p(buf,plen,PSTR("<br></font></h2>") ); plen=es.ES fill tcp data p(buf,plen,PSTR("</center><hr>")); plen=es.ES fill tcp data p(buf,plen,PSTR("Tiago Maluta maluta@unifei.edu.br ")); plen=es.ES fill tcp data p(buf,plen,PSTR("<a href=’’http://www.coding.com.br’’>www.coding.com.br</a>")); plen=es.ES fill tcp data p(buf,plen,PSTR("</body></html>")); return(plen); } Tiago Maluta Hardware Open Source
  • 28. void setup(){ // initialize enc28j60 es.ES enc28j60Init(mymac); // init the ethernet/ip layer: es.ES init ip arp udp tcp(mymac,myip, MYWWWPORT); } Tiago Maluta Hardware Open Source
  • 29. void loop(){ uint16 t plen, dat p; while(1) { // read packet, handle ping and wait for a tcp packet: dat p=es.ES packetloop icmp tcp(buf,es.ES enc28j60PacketReceive(BUFFER SIZE, buf)); /∗ dat p will be unequal to zero if there is a valid ∗ http get ∗/ if(dat p==0){ // no http request continue; } // tcp port 80 begin if (strncmp("GET ",(char ∗)&(buf[dat p]),4)!=0){ // head, post and other methods: dat p=http200ok(); dat p=es.ES fill tcp data p(buf,dat p,PSTR("<h1>200 OK</h1>")); goto SENDTCP; } // just one web page in the "root directory" of the web server if (strncmp("/ ",(char ∗)&(buf[dat p+4]),2)==0){ dat p=print webpage(buf); goto SENDTCP; } else{ dat p=es.ES fill tcp data p(buf,0,PSTR("HTTP/1.0 401 UnauthorizedrnContent-Type: text/htmlrnrn<h1>401 Unauthorized</h1>")); goto SENDTCP; } SENDTCP: es.ES www server reply(buf,dat p); // send web page data } Tiago Maluta Hardware Open Source
  • 30. Outros projetos Twitter Pain´eis Solares Sintetizador de som GPS Sensores (Umidade, Luz, etc) Compartilhamento atrav´es do Pachube (http://community.pachube.com/) Tiago Maluta Hardware Open Source
  • 31. Considera¸c˜oes Consumo el´etrico Custo (R$) Documenta¸c˜ao Esquem´atico BOM PCB Propriedade Intelectual Licen¸ca Compat´ıvel Sugest˜ao: Creative Commons Comunidade de Usu´arios Tiago Maluta Hardware Open Source