Warning: Board breadboard:avr:atmega328bb
doesn't define a 'build.board' preference. Auto-set to:
AVR_ATMEGA328BB Der Sketch verwendet 224.153 Bytes (21%) des Programmspeicherplatzes. Das Maximum sind 1.044.464 Bytes. Globale Variablen verwenden 31.656 Bytes (38%) des dynamischen Speichers, 50.264 Bytes für lokale Variablen verbleiben. Das Maximum sind 81.920 Bytes. Uploading 228304 bytes from /tmp/arduino_build_508065/Blink.ino.bin to flash at 0x00000000 ................................................................................ [ 35% ] ................................................................................ [ 71% ] ............................................................... [ 100% ] |
ESP starting. system_get_time(): 18254785 system_get_rst_info() reset reason: REASON_EXT_SYS_RST system_get_free_heap_size(): 45472 system_get_os_print(): 0 system_get_os_print(): 1 system_get_chip_id(): 0x951444 system_get_sdk_version(): 1.5.3(aec24ac9) system_get_boot_version(): 31 system_get_userbin_addr(): 0x0 system_get_boot_mode(): SYS_BOOT_NORMAL_MODE system_get_cpu_freq(): 160 system_get_flash_size_map(): FLASH_SIZE_32M_MAP_512_512 wifi_get_opmode(): 3 - STATIONAP_MODE wifi_get_opmode_default(): 3 - STATIONAP_MODE wifi_get_broadcast_if(): 2 SoftAP Configuration -------------------- ssid: TestAP password: testtesttest ssid_len: 6 channel: 1 authmode: AUTH_WPA2_PSK ssid_hidden: 0 max_connection: 4 beacon_interval: 100ms -------------------- wifi_get_channel(): 6 wifi_get_phy_mode(): PHY_MODE_11N system_get_time(): 18322740 EVENT_STAMODE_CONNECTED () EVENT_STAMODE_GOT_IP () |
/* * GET_TIME @ ss */ #include <ESP8266WiFi.h> void setup() { Serial.begin(115200); WiFi.begin("FreifunkWees01.2 (http://ffw)", ""); while (WiFi.status() != WL_CONNECTED) { delay(100); Serial.print("."); } Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP()); } char *getChecksum(char *strg) { static char buf[5]; int cs=0; for(char *ptr=strg; *ptr!='\0'; ptr++) { cs+=*ptr; } snprintf(buf, 5, "%04x", cs); return(buf); } void loop() { WiFiClient client; if (!client.connect("192.168.42.80", 2626)) { Serial.println("connection failed"); delay(1000); return; } client.write("GET_TIME,"); client.write(getChecksum("GET_TIME")); while(client.available()==0) { delay(1); } while(client.available()>0) { Serial.print((char)client.read()); } Serial.println("<EOT"); client.stop(); while(1) {delay(1000);} } |
............................ WiFi connected IP address: 192.168.42.110 2017.01.23 19:49:22,03ba<EOT |
Pin |
Beschriftung |
Pin |
Beschriftung | |
1 |
5V |
9 |
RST |
|
2 |
G |
10 |
A0 |
|
3 |
D4 |
11 |
D0 |
|
4 |
D3 |
12 |
D5 |
|
5 |
D2 |
13 |
D6 |
|
6 |
D1 |
14 |
D7 |
|
7 |
RX |
15 |
D8 |
|
8 |
TX |
16 |
3V3 |
static const uint8_t SDA = 4; static const uint8_t SCL = 5; static const uint8_t LED_BUILTIN = 16; static const uint8_t BUILTIN_LED = 16; static const uint8_t D0 = 16; static const uint8_t D1 = 5; static const uint8_t D2 = 4; static const uint8_t D3 = 0; static const uint8_t D4 = 2; static const uint8_t D5 = 14; static const uint8_t D6 = 12; static const uint8_t D7 = 13; static const uint8_t D8 = 15; static const uint8_t D9 = 3; static const uint8_t D10 = 1; |
#define EXTERNAL_NUM_INTERRUPTS 16 #define NUM_DIGITAL_PINS 17 #define NUM_ANALOG_INPUTS 1 static const uint8_t SS = 15; static const uint8_t MOSI = 13; static const uint8_t MISO = 12; static const uint8_t SCK = 14; static const uint8_t A0 = 17; |
int pins[]={16, 5, 4, 0, 2, 14, 12, 13, 15}; void setup() { Serial.begin(115200); for(int p=0; p<9; p++) { pinMode(pins[p], OUTPUT); digitalWrite(pins[p], LOW); } } void loop() { for(int p=0; p<9; p++) { Serial.println(pins[p]); digitalWrite(pins[p], HIGH); delay(3000); digitalWrite(pins[p], LOW); } } |
Beschriftung |
Pin# |
Beschriftung | Pin# |
|
5V |
RST |
|||
G |
A0 |
|||
D4 |
2 |
D0 |
16 |
|
D3 |
0 |
D5 |
14 |
|
D2 |
4 |
D6 |
12 |
|
D1 |
5 |
D7 |
13 |
|
RX |
D8 |
15 |
||
TX |
3V3 |
ESP starting. system_get_time(): 17362548 system_get_rst_info() reset reason: REASON_EXT_SYS_RST system_get_free_heap_size(): 46768 system_get_os_print(): 0 system_get_os_print(): 1 system_get_chip_id(): 0x23ED8B system_get_sdk_version(): 1.5.3(aec24ac9) system_get_boot_version(): 31 system_get_userbin_addr(): 0x0 system_get_boot_mode(): SYS_BOOT_NORMAL_MODE system_get_cpu_freq(): 160 system_get_flash_size_map(): FLASH_SIZE_32M_MAP_512_512 wifi_get_opmode(): 2 - SOFTAP_MODE wifi_get_opmode_default(): 2 - SOFTAP_MODE wifi_get_broadcast_if(): 2 SoftAP Configuration -------------------- ssid: TestAP password: testtesttest ssid_len: 6 channe beacon_interval: 100ms -------------------- wifi_get_channesystem_get_time(): 19392300 |