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
| import gpiod | |
| import time | |
| # Define GPIO chip and lines | |
| chip = gpiod.Chip('gpiochip0') | |
| relay1_line = chip.get_line(17) | |
| relay2_line = chip.get_line(27) | |
| # Configure GPIO lines as outputs | |
| config = gpiod.line_request() |
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 <Servo.h> | |
| Servo Servo_X; | |
| Servo Servo_Y; | |
| Servo Servo_Grip; | |
| #define Joy_X A0 | |
| #define Joy_Y A1 | |
| #define BUTTON 2 |
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: | |
| #Portainer - For manage container | |
| portainer: | |
| image: portainer/portainer-ce:latest | |
| ports: | |
| - "9443:9443" | |
| volumes: |
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 <TridentTD_LineNotify.h> | |
| #define SSID "Your WiFi SSID" //ชื่อ WiFi ที่จะใช้ | |
| #define PASSWORD "You WiFi Password" //รหัสผ่านของ WiFi ที่จะใช้ | |
| void setup() { | |
| Serial.begin(115200, SERIAL_8N1); | |
| Serial.println("WiFi connecting..."); | |
| WiFi.begin(SSID, PASSWORD); | |
| while (!WiFi.isConnected()) delay(400); |
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 <TridentTD_LineNotify.h> | |
| #define SSID "Your wifi SSID" | |
| #define PASSWORD "Your wifi Password" | |
| void setup() { | |
| Serial.begin(115200); | |
| Serial.println("WiFi connecting..."); | |
| WiFi.begin(SSID, PASSWORD); | |
| while (!WiFi.isConnected()) delay(400); |
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 <LiquidCrystal_I2C.h> | |
| LiquidCrystal_I2C lcd(0x27, 16, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display | |
| #define _1BATH 3 | |
| #define _2BATH 4 | |
| #define _5BATH 5 | |
| #define _10BATH 6 | |
| #define PIEZO 8 | |
| int count_1BATH = 0; |
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
| import machine | |
| import utime | |
| led1_red = machine.Pin(2,machine.Pin.OUT) | |
| led1_amber = machine.Pin(3,machine.Pin.OUT) | |
| led1_green = machine.Pin(4,machine.Pin.OUT) | |
| led2_red = machine.Pin(6,machine.Pin.OUT) | |
| led2_amber = machine.Pin(7,machine.Pin.OUT) | |
| led2_green = machine.Pin(8,machine.Pin.OUT) |
NewerOlder