Files
bachirandClaude Opus 5.5 e6755405b4 rangement : firmware, support E01 et boîtier rejoignent le dépôt de la carte
- pcb/gateway : projet KiCad renommé nano--gateway--e01-ml01sp4, Gerber zippés (les dossiers décompressés, le cache et les réglages locaux ne sont plus suivis), BOM ; titre du schéma au nom de l'appareil
- pcb/socket-e01 : support du module E01-ML01SP4 (depuis ../E01-ml01sp4-socket)
- firmware/firmware.ino : ms-gateway-nano-E01-ml01sp4.ino (04.04.2023)
- boitier : boîtier FreeCAD et STL (depuis 3DPrinting/electronique/MS gateway nano enclosure)
- docs/captures : captures de 2023 ; docs/images : schémas, faces des circuits, rendus 3D
- netlists, DRC et firmware compilé identiques avant et après ; README réécrit, .gitignore

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 22:46:56 +01:00

115 lines
3.0 KiB
Arduino

//https://github.com/mysensors/MySensors/blob/master/MyConfig.h
// Enable debug prints to serial monitor
// #define MY_DEBUG
// #define MY_DEBUG_VERBOSE_GATEWAY
// #define MY_DEBUG_VERBOSE_RF24
// Enable and select radio type attached
#define MY_RADIO_RF24
//#define MY_RADIO_NRF5_ESB
//#define MY_RADIO_RFM69
//#define MY_RADIO_RFM95
// Set LOW transmit power level as default, if you have an amplified NRF-module and
// power your radio separately with a good regulator you can turn up PA level.
/**
* @def MY_RF24_PA_LEVEL
* @brief Default RF24 PA level. Override in sketch if needed.
*
* - RF24_PA_MIN = -18dBm
* - RF24_PA_LOW = -12dBm
* - RF24_PA_HIGH = -6dBm
* - RF24_PA_MAX = 0dBm
*/
#define MY_RF24_PA_LEVEL RF24_PA_MAX
//#define MY_RF24_CE_PIN (12)
//#define MY_RF24_CS_PIN (13)
//#define MY_RF24_IRQ_PIN (5)
// #define MY_RF24_IRQ_PIN (2)
// Enable serial gateway
#define MY_GATEWAY_SERIAL
// Define a lower baud rate for Arduinos running on 8 MHz (Arduino Pro Mini 3.3V & SenseBender)
// #if F_CPU == 8000000L
// #define MY_BAUD_RATE 38400
// #endif
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
#define MY_INCLUSION_BUTTON_FEATURE
// Inverses behavior of inclusion button (if using external pullup)
//#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 180
// Digital pin used for inclusion mode button
#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Inverses the behavior of leds
//#define MY_WITH_LEDS_BLINKING_INVERSE
// Flash leds on rx/tx/err
// Uncomment to override default HW configurations
#define MY_DEFAULT_RX_LED_PIN 4 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 5 // the PCB, on board LED
#define MY_DEFAULT_ERR_LED_PIN 6 // Error led pin
#define MY_RF24_CHANNEL 14
// #define MY_SIGNING_SIMPLE_PASSWD "C@KptBi1L@5op?8!"
// #define MY_SECURITY_SIMPLE_PASSWD "C@KptBi1L@5op?8!"
// #define MY_LINUX_SERIAL_PORT "/dev/ttyMSGW_CH14"
/**
* @def MY_RX_MESSAGE_BUFFER_FEATURE
* @brief This enables the receiving buffer feature.
*
* This feature is currently not supported for anything but RF24.
* Require @ref MY_RF24_IRQ_PIN to be set.
*
* Note: Not supported on ESP8266, ESP32, STM32, nRF5 and sketches
* that use SoftSPI. See below issue for details
* https://github.com/mysensors/MySensors/issues/1128
*/
// #define MY_RX_MESSAGE_BUFFER_FEATURE
/**
* @def MY_BAUD_RATE
* @brief Serial output baud rate (debug prints and serial gateway speed).
*
* The baud rate configured here must match the baud rate at the "other" end.
*
* @warning Depending on your target device and clock speed, certain baud rates might not work well.
*/
// #define MY_BAUD_RATE (115200ul)
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
// Serial.println('setup');
}
void presentation()
{
// Serial.println('presentation');
// Present locally attached sensors
}
void loop()
{
// Serial.println('loop');
// Send locally attached sensor data here
}