This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "github.com/iamgoangle/rabbit-go/internal/rabbitmq" | |
| ) | |
| func main() { | |
| conn, err := rabbitmq.NewConnection(rabbitmq.ConfigConnection{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "github.com/iamgoangle/rabbit-go/internal/rabbitmq" | |
| ) | |
| func main() { | |
| conn, err := rabbitmq.NewConnection(rabbitmq.ConfigConnection{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| rabbitmq: | |
| image: bitnami/rabbitmq:latest | |
| environment: | |
| - RABBITMQ_NODE_PORT_NUMBER=5672 | |
| - RABBITMQ_DEFAULT_VHOST=/ | |
| - RABBITMQ_USERNAME=admin | |
| - RABBITMQ_PASSWORD=1234 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ESP8266WiFi.h> | |
| #include <ESP8266HTTPClient.h> | |
| #include <BlynkSimpleEsp8266.h> | |
| #include <dht11.h> | |
| // WiFi | |
| //const char *ssid = "<your_ssid>"; | |
| //const char *password = "<your_password>"; | |
| char networkDriver = 'b'; // 'n' = normal 'b' = blynk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ESP8266WiFi.h> | |
| #include <ESP8266HTTPClient.h> | |
| #include <BlynkSimpleEsp8266.h> | |
| #include <dht11.h> | |
| // WiFi | |
| //const char *ssid = "<your_ssid>"; | |
| //const char *password = "<your_password>"; | |
| char networkDriver = 'b'; // 'n' = normal 'b' = blynk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @project Controle LED via WiFi with Blynk | |
| * @author Teerapong Singthong <st.teerapong@gmail.com> | |
| * @desc medium.com/iamgoangle | |
| */ | |
| #define BLYNK_PRINT Serial | |
| #include <ESP8266WiFi.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| This sketch demonstrates how to scan WiFi networks. | |
| The API is almost the same as with the WiFi Shield library, | |
| the most obvious difference being the different file you need to include: | |
| */ | |
| #include "ESP8266WiFi.h" | |
| void setup() | |
| { | |
| Serial.begin(115200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ESP8266WiFi.h> | |
| void setup(){ | |
| Serial.begin(115200); | |
| } | |
| void loop(){ | |
| Serial.println(); | |
| Serial.print("MAC: "); | |
| Serial.println(WiFi.macAddress()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output | |
| } | |
| // the loop function runs over and over again forever | |
| void loop() { | |
| digitalWrite(LED_BUILTIN, LOW); // Turn the LED on (Note that LOW is the voltage level | |
| // but actually the LED is on; this is because | |
| // it is active low on the ESP-01) | |
| delay(1000); // Wait for a second |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func A() { | |
| start := time.Now() |