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
/* -------------------------------------------------------------------------- */ | |
/* ModuleMore AM2306 (Modbus) Example code */ | |
/* -------------------------------------------------------------------------- */ | |
/* ------------------------------- วิธีการต่อ ------------------------------- */ | |
/** | |
* ESP8266 ---> MAX485 ---> AM2306 | |
* 5V 5V RED | |
* GND GND BLACK | |
* - RE (ต่อกับDE) |
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
from machine import Pin, Timer | |
from time import sleep | |
import time | |
from neopixel import Neopixel # neopixel lib = https://github.com/blaz-r/pi_pico_neopixel/blob/main/neopixel.py | |
LED_PIN = 25 | |
USRBUTTON_PIN = 24 | |
NEOPIXEL_PIN = 23 |
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
/* ------------------ Relay Reading/Writing code by ModuleMore.com ----------------- */ | |
/* ------------------------------- วิธีการต่อ ------------------------------- */ | |
/** | |
* @file main.cpp | |
* @author ModuleMore.com ([email protected]) | |
* @brief รับส่งค่า relay เวอร์ชั่น RS485 โดยใช้ RS485 to TTL (รุ่นมี tx rx และ gnd ของ rs485) | |
* สื่อสารผ่าน Serial1 (ที่เรา define ขาไว้เป็น RX = 13, TX = 15) ด้วย Library ModbusMaster | |
* | |
* Wiring |
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
/* ------------------ Relay Reading/Writing code by ModuleMore.com ----------------- */ | |
/* ------------------------------- วิธีการต่อ ------------------------------- */ | |
/** | |
* @file main.cpp | |
* @author ModuleMore.com ([email protected]) | |
* @brief รับส่งค่า relay เวอร์ชั่น RS485 โดยใช้ RS485 to TTL (รุ่นมี tx rx และ gnd ของ rs485) | |
* สื่อสารผ่าน Serial1 (ที่เรา define ขาไว้เป็น RX = 13, TX = 15) ด้วย Library ModbusMaster | |
* | |
* Wiring |
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
/** | |
Example of Modulemore XKC-Y25-PNP (NO configuration) | |
Sensor ---- Arduino | |
(Brown) VCC = 5v | |
(Yellow) INPUT = digital 5 --> 4.7k ohm --> GND | |
(Blue) GND = GND | |
(Black) Not connected. | |
*/ | |
int XKC_NO_PIN = 5; | |
void setup() { |
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
/* -------------------------------------------------------------------------- */ | |
/* ModuleMore SHT20 (Modbus) Example code */ | |
/* -------------------------------------------------------------------------- */ | |
/* ------------------------------- วิธีการต่อ ------------------------------- */ | |
/** | |
* ESP32 ---> MAX485 ---> XY-MD02 | |
* 3.3V 3.3V | |
* GND GND - | |
* 21 RX |
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
/** | |
www.modulemore.com | |
Example for serial mode of GY-25 | |
Product link : https://www.modulemore.com/product/1888/เซนเซอร์วัดการเอียง-gy-25-tilt-sensor-module-mpu-6050 | |
Based on : https://forum.arduino.cc/t/run-gy-25-in-arduino-ide-with-kalman-filter/565016 | |
PDF : http://mkpochtoi.ru/GY25_MANUAL_EN.pdf | |
*/ | |
#include <SoftwareSerial.h> | |
static const int RXPin = 2, TXPin = 3; // announce your Rx and Tx pins |
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
### ekf config file ### | |
ekf_filter_node: | |
ros__parameters: | |
# The frequency, in Hz, at which the filter will output a position estimate. Note that the filter will not begin | |
# computation until it receives at least one message from one of the inputs. It will then run continuously at the | |
# frequency specified here, regardless of whether it receives more measurements. Defaults to 30 if unspecified. | |
frequency: 25.0 | |
# The period, in seconds, after which we consider a sensor to have timed out. In this event, we carry out a predict | |
# cycle on the EKF without correcting it. This parameter can be thought of as the minimum frequency with which the |
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 launch | |
from launch_ros.actions import ComposableNodeContainer, Node | |
from launch_ros.descriptions import ComposableNode | |
def generate_launch_description(): | |
"""Launch file which brings up visual slam node configured.""" | |
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 <i2cmaster.h> | |
#define uint16_t unsigned int | |
typedef struct | |
{ | |
uint16_t Red; | |
uint16_t Green; | |
uint16_t Blue; | |
uint16_t Clear; | |
} RGB; |