Preço reduzido

Placa ESP8266 Thing - Sparkfun

18,56 €
21,83 €

(SEM IVA 15.09€)

ef17b0187sk

A Placa ESP8266 Thing (Sparkfun) é uma placa de desenvolvimento para o ESP8266 WiFi SoC - uma plataforma líder para a "Internet of Things" (IoT) ou projetos relacionados com WiFi. Esta placa é de baixo custo e fácil de usar, e o Arduino IDE pode ser alcançado em apenas alguns passos. 

Desconto de quantidade

Quantidade Preço Poupa
3 18,37 € Até 0,56 €
5 18,00 € Até 2,78 €
10 17,63 € Até 9,28 €
Quantidade
Disponível Loja Gaia e Online (Envio 24h)

A Placa ESP8266 Thing é uma placa de desenvolvimento para o ESP8266 WiFi SoC - uma plataforma líder para a "Internet of Things" (IoT) ou projetos relacionados com WiFi. Esta placa é de baixo custo e fácil de usar, e o Arduino IDE pode ser alcançado em apenas alguns passos.  

A ESP8266 Thing faz de tudo, desde ligar um LED até postar dados com phant.io, e pode ser programada como qualquer microcontrolador. Pode até programar a placa através do Arduino IDE  instalando o complemento Arduino ESP8266. 

A placa ESP8266 Thing é uma placa relativamente simples. Os pinos estão divididos em duas linhas paralelas compatíveis com breadboards. Os conectores USB e LiPo na parte superior da placa fornecem energia - controlada pelo interruptor ON / OFF. As LEDs no interior da placa indicam potência, carga e status do IC. A tensão máxima da ESP8266 é 3.6V, portanto a placa tem um regulador interno de 3.3V para enviar uma tensão segura e consistente ao IC. Isto significa que os pinos I/O da ESP8266 também funcionam em 3.3V, só precisa mudar de nível quaisquer sinais de 5V enviados para o IC. Um 3.3V FTDI Basic é necessário para programar a ESP8266 Thing, mas outros conversores de série com níveis 3.3V I/O  também devem funcionar muito bem. O conversor precisa de uma linha DTR para além dos pinos RX e TX. 

Características:
• Pinos divididos em duas linhas paralelas;
• Carregador/fonte de alimentação LiPo inserida na placa;
• 802,11 b/g/n;
• WiFi Direto (P2P), soft-AP;
• TCP/IP integrado;
• Interruptor TR, balun, LNA, amplificador de potência e rede de correspondência integrados;
• PLLs, reguladores, DCXO e unidades de gestão de energia integrados;
• CPU de 32 bits de baixa potência integrada que pode ser usada como processador de aplicativos;
• +19.5dBm de potência de saída no modo 802.11b. 

Documentos:
→ Esquema
→ Guia
→ Datasheet Gráfica 

Pinagem:

Código Exemplo: 

// Include the ESP8266 WiFi library. (Works a lot like the
// Arduino WiFi library.)
#include <ESP8266WiFi.h>
// Include the SparkFun Phant library.
#include <Phant.h>
//////////////////////
// WiFi Definitions //
//////////////////////
const char WiFiSSID[] = "WiFi_Network";
const char WiFiPSK[] = "WiFi_Password";
/////////////////////
// Pin Definitions //
/////////////////////
const int LED_PIN = 5; // Thing's onboard, green LED
const int ANALOG_PIN = A0; // The only analog pin on the Thing
const int DIGITAL_PIN = 12; // Digital pin to be read
////////////////
// Phant Keys //
////////////////
const char PhantHost[] = "data.sparkfun.com";
const char PublicKey[] = "wpvZ9pE1qbFJAjaGd3bn";
const char PrivateKey[] = "wzeB1z0xWNt1YJX27xdg";
// Time to sleep (in seconds):
const int sleepTimeS = 30;
void setup() 
{
initHardware();
connectWiFi();
digitalWrite(LED_PIN, HIGH);
while (postToPhant() != 1)
{
delay(100);
}
digitalWrite(LED_PIN, LOW);
// deepSleep time is defined in microseconds. Multiply
// seconds by 1e6
ESP.deepSleep(sleepTimeS * 1000000);
}
void loop() 
{
}
void connectWiFi()
{
byte ledStatus = LOW;
// Set WiFi mode to station (as opposed to AP or AP_STA)
WiFi.mode(WIFI_STA);
// WiFI.begin([ssid], [passkey]) initiates a WiFI connection
// to the stated [ssid], using the [passkey] as a WPA, WPA2,
// or WEP passphrase.
WiFi.begin(WiFiSSID, WiFiPSK);
// Use the WiFi.status() function to check if the ESP8266
// is connected to a WiFi network.
while (WiFi.status() != WL_CONNECTED)
{
// Blink the LED
digitalWrite(LED_PIN, ledStatus); // Write LED high/low
ledStatus = (ledStatus == HIGH) ? LOW : HIGH;
// Delays allow the ESP8266 to perform critical tasks
// defined outside of the sketch. These tasks include
// setting up, and maintaining, a WiFi connection.
delay(100);
// Potentially infinite loops are generally dangerous.
// Add delays -- allowing the processor to perform other
// tasks -- wherever possible.
}
}
void initHardware()
{
Serial.begin(9600);
pinMode(DIGITAL_PIN, INPUT_PULLUP);
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
// Don't need to set ANALOG_PIN as input,
// that's all it can be.
}
int postToPhant()
{
// LED turns on when we enter, it'll go off when we
// successfully post.
digitalWrite(LED_PIN, HIGH);
// Declare an object from the Phant library - phant
Phant phant(PhantHost, PublicKey, PrivateKey);
// Do a little work to get a unique-ish name. Append the
// last two bytes of the MAC (HEX'd) to "Thing-":
uint8_t mac[WL_MAC_ADDR_LENGTH];
WiFi.macAddress(mac);
String macID = String(mac[WL_MAC_ADDR_LENGTH - 2], HEX) +
String(mac[WL_MAC_ADDR_LENGTH - 1], HEX);
macID.toUpperCase();
String postedID = "Thing-" + macID;
// Add the four field/value pairs defined by our stream:
phant.add("id", postedID);
phant.add("analog", analogRead(ANALOG_PIN));
phant.add("digital", digitalRead(DIGITAL_PIN));
phant.add("time", millis());
// Now connect to data.sparkfun.com, and post our data:
WiFiClient client;
const int httpPort = 80;
if (!client.connect(PhantHost, httpPort))
{
// If we fail to connect, return 0.
return 0;
}
// If we successfully connected, print our Phant post:
client.print(phant.post());
// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil('r');
//Serial.print(line); // Trying to avoid using serial
}
// Before we exit, turn the LED off.
digitalWrite(LED_PIN, LOW);
return 1; // Return success
}
NOVA ENCOMENDA