Chegamos a mais um aplicativo Android direcionado a Arduino e Ethernet shield. Com o app Arduino Http LM35, um Arduino Mega ou Uno (ambos testados), um ethernet shield e um sensor de temperatura LM35, conseguimos fazer a leitura de temperaturas ambientes. Se utilizado o modelo de sensor blindado, é possível ler a temperatura submerso em água, por exemplo.
Na tela principal, é possível receber a temperatura em três escalas: Celsius, Farenheit e Kelvin.
Abaixo, segue o código que deve ser “upado” em seu Arduino:
#include <SPI.h> #include <String.h> #include <Ethernet.h> byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192, 168, 0, 199); IPAddress gateway(192, 168, 0, 1); IPAddress subnet(255, 255, 255, 0); EthernetServer server(8090); String readString = String(30); const int sensor = A0; double medida; void setup(){ Ethernet.begin(mac, ip, gateway, subnet); server.begin(); } void loop(){ EthernetClient client = server.available(); if (client) { while (client.connected()){ if (client.available()){ char c = client.read(); if (readString.length() < 30){ readString += (c); } if (c == '\n'){ client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println(); if(readString.indexOf("fedablio")>=0){ medida = (float(analogRead(sensor))*5/(1023))/0.01; String valor = String(medida, 2); client.print(valor); } readString = ""; client.stop(); } } } } }
Para a instalação correta do Arduino, siga os tutoriais conforme o sistema operacional de seu computador Desktop ou Notebook:
WindowsMac OS
Linux
Clique aqui para instalar o aplicativo (Google Play)
Política de privacidade (pt-BR)
Os dados como IP (ou domínio) ficam salvos exclusivamente no dispositivo (smartphone ou tablet do usuário). Ou seja, não são enviados para outro local e nenhuma informação do usuário fica em poder de “fedablio.com.br”.
- O aplicativo solicita permissão de internet: significa que é necessário trafegar dados através de uma rede.
- O aplicativo solicita permissão de rede: significa que vai verificar se tem conexão de rede. Seja ela rede local (com ou sem internet) ou rede de dados (Edge, 3G, 4G e etc).
Privacy policy (en-US)
Data such as IP (or domain) is saved exclusively on the device (user’s smartphone or tablet). That is, they are not sent to another location and no user information remains with “fedablio.com.br”.
- The application asks for internet permission: it means that it is necessary to traffic data over a network.
- The application asks for network permission: it means that it will check if you have a network connection. Be it local network (with or without internet) or data network (Edge, 3G, 4G and etc.).

