1
0
mirror of https://github.com/arduino/library-registry.git synced 2025-09-11 14:30:47 +03:00
Commit Graph

4666 Commits

Author SHA1 Message Date
Sebastian Romero
d997a47c6a Rename Modulino Library 2025-08-20 10:22:23 +02:00
kenchow96
d7591af62e Update repositories.txt (#6806) 2025-08-20 07:37:14 +00:00
jaikulk14
0a3e29a107 Update repositories.txt (#6804) 2025-08-20 07:17:06 +00:00
satoyon
54fe7d7a28 Update repositories.txt (#6803) 2025-08-20 01:43:26 +00:00
gregvp
caa09c0005 Add SendOnlySerial library (#6802)
Low RAM and flash memory library for debugging and logging over serial, instead of using Serial. Saves SRAM and flash memory for boards based on ATmega328P.
2025-08-19 22:55:14 +00:00
Milad Nikpendar
5a3ce542c9 Update repositories.txt (#6801) 2025-08-19 13:54:42 +00:00
Yao Cui
0e60ffbb68 Update repositories.txt (#6800) 2025-08-19 07:26:49 +00:00
Liontron Systems
e80f7684b8 Update repositories.txt (#6799) 2025-08-18 19:13:14 +00:00
Yohanna Philip Abana
4de81e25e0 Update repositories.txt (#6798) 2025-08-18 14:00:14 +00:00
tomorrow56 A.K.A. ThousanDIY
f634ca5f31 Update repositories.txt (#6797) 2025-08-18 09:36:09 +00:00
Edward Sicoe
bdea7f92d8 Update repositories.txt (#6796) 2025-08-18 03:59:52 +00:00
Limor "Ladyada" Fried
9894f565e8 Update repositories.txt (#6795)
https://github.com/adafruit/Adafruit_TCS3430
2025-08-18 01:21:15 +00:00
Limor "Ladyada" Fried
e6a5131011 Update repositories.txt (#6794)
https://github.com/adafruit/Adafruit_VEML6046
2025-08-17 17:20:10 +00:00
Chijindu-Orji Iseh-Ntah
6e9f23260a Update repositories.txt (#6793) 2025-08-17 00:12:57 +00:00
Liontron Systems
34f53fad28 Update repositories.txt (#6792) 2025-08-16 20:30:22 +00:00
Andreas1313
cd286dfe1a Update repositories.txt (#6788) 2025-08-15 13:37:47 +00:00
jaikulk14
e798a6eaff Update repositories.txt (#6787) 2025-08-15 07:21:05 +00:00
exia
accc65b194 Update repositories.txt (#6786)
add M5SwitchC6-ESP-NOW
2025-08-15 03:02:02 +00:00
Park Jang-Hyun
8bd0d6da94 Update repositories.txt (#6785) 2025-08-15 02:01:10 +00:00
Lewis He
d8424a56cf Added LilyGoLib (#6784) 2025-08-15 01:00:23 +00:00
Liontron Systems
ebe7592ecf Update repositories.txt (#6783) 2025-08-14 20:20:51 +00:00
PTSolns
9344c14a81 Update repositories.txt (#6782) 2025-08-14 20:14:34 +00:00
Zefek
f23962aadf Update repositories.txt (#6781) 2025-08-14 12:36:39 +00:00
krosDC
3890feb251 RS-232 MentorBit library publication (#6780)
* Update repositories.txt

* Update repositories.txt
2025-08-14 10:30:05 +00:00
krosDC
c7f0ac9885 Update repositories.txt (#6779) 2025-08-14 09:43:29 +00:00
PALLOB KUMAR GAIN
8823b03b12 Update repositories.txt (#6778) 2025-08-14 08:27:55 +00:00
krosDC
6a2b8c6085 Update repositories.txt (#6777) 2025-08-14 07:40:54 +00:00
Liontron Systems
4eec4abf57 Update repositories.txt (#6776) 2025-08-13 19:29:26 +00:00
MQuero
6b85490eb7 Update repositories.txt (#6775) 2025-08-13 17:41:42 +00:00
Bastian
c16ad5a1c5 Update repositories.txt (#6774) 2025-08-13 17:26:31 +00:00
Om Anavekar
a8211bdcc9 Update repositories.txt (#6769)
* Update repositories.txt

* Update repositories.txt (remove duplicate)
2025-08-12 23:40:01 +00:00
Tomoki Takahashi
97be98657c Update repositories.txt (#6766) 2025-08-12 18:03:26 +00:00
Rob Tillaart
a5aaa6136d Update repositories.txt (#6763)
Arduino library for a Sliding Mode Controller (SMC).
2025-08-12 09:23:53 +00:00
Raghav Garg
47d8f04391 Add BLE OTA Firmware Update library (#6762)
Co-authored-by: raghavgarg <raghav.garg@convegenius.ai>
2025-08-12 06:07:19 +00:00
DIYables
134adf3a8b Update repositories.txt (#6761) 2025-08-12 05:57:02 +00:00
Benas09
9dc73be75a Add FujitsuAC library (#6760) 2025-08-12 04:38:11 +00:00
Nv7
78370960e0 Add Tektite RotEv (#6759) 2025-08-12 02:20:02 +00:00
abdullahtemel97
9f72658fb4 Update repositories.txt (#6752) 2025-08-11 17:32:11 +00:00
German-source
56e2725c68 Update repositories.txt (#6751) 2025-08-11 12:02:53 +00:00
yosob
1b7d7e8593 Update repositories.txt (#6750) 2025-08-11 03:39:16 +00:00
Riley Cornelius
7fbdb64c9c Update repositories.txt (#6749) 2025-08-10 22:32:59 +00:00
tobiastl
a4de2232cc Update repositories.txt (#6748) 2025-08-10 14:34:31 +00:00
jaikulk14
7736b3047b Add QuickAPConnect to Arduino Library Manager (#6746)
* Create QuickAPConnect.yml

* Update repositories.txt

* Delete libraries/QuickAPConnect.yml
2025-08-10 14:15:35 +00:00
Limor "Ladyada" Fried
e52d040316 Update repositories.txt (#6745)
https://github.com/adafruit/Adafruit_BMP5xx
2025-08-10 13:16:35 +00:00
Limor "Ladyada" Fried
df1dedc0cd Update repositories.txt (#6744)
https://github.com/adafruit/Adafruit_bq25628e
2025-08-10 12:31:28 +00:00
junan8733
98d9ae9ea6 Update repositories.txt (#6743) 2025-08-10 10:31:39 +00:00
Max
df31007580 Update repositories.txt (#6740) 2025-08-10 02:54:40 +00:00
Riley Cornelius
103e316f6e Update repositories.txt (#6739) 2025-08-10 01:20:59 +00:00
MQuero
94a604e50a Update repositories.txt (#6738) 2025-08-09 20:09:40 +00:00
ntirushwajeanmarc
0af5ba5c1c Update repositories.txt (#6736)
# CircuitNotion Arduino Library

A powerful Arduino library for connecting ESP8266/ESP32 microcontrollers to the CircuitNotion IoT platform. This library enables seamless sensor data collection, device control, and real-time communication with your CircuitNotion dashboard.

## πŸš€ Features

- **Real-time Communication**: WebSocket-based bidirectional communication with CircuitNotion servers
- **Dashboard Integration**: Full integration with the CircuitNotion web dashboard at [iot.circuitnotion.com](https://iot.circuitnotion.com)
- **Sensor Management**: Easy setup for temperature, humidity, light, motion, and custom sensors
- **Device Control**: Map dashboard devices to local pins for automatic control
- **Auto-Reconnection**: Robust connection handling with automatic reconnection
- **Change Detection**: Intelligent sensor reading optimization to reduce bandwidth
- **Memory Efficient**: Optimized for resource-constrained microcontrollers
- **Production Ready**: Comprehensive error handling and diagnostics

## πŸ“‹ Getting Started - Complete Setup Guide

### Step 1: Dashboard Account Setup

1. **Visit the CircuitNotion Dashboard**

   - Go to [iot.circuitnotion.com](https://iot.circuitnotion.com)
   - Click "Sign Up" to create a new account
   - Fill in your details (name, email, password)
   - Verify your email address

2. **Initial Dashboard Setup**
   - Log in to your new account
   - Complete your profile setup
   - Choose your subscription plan (free tier available)

### Step 2: Create Your Devices

Before writing any Arduino code, you need to create devices in your dashboard:

1. **Navigate to Devices**

   - In the dashboard, click "Devices" in the main navigation
   - Click "Add New Device"

2. **Create Your First Device**

   ```
   Device Name: Living Room Light
   Device Type: Light/LED
   Location: Living Room
   Description: Main ceiling light
   ```

   - Click "Create Device"
   - **Note the Device Serial** (e.g., `LIGHT_001`) - you'll need this for Arduino code

3. **Create More Devices** (repeat for each physical device)

   ```
   Temperature Sensor Device:
   Name: Living Room Temperature
   Type: Sensor
   Location: Living Room
   Serial: TEMP_001

   Humidity Sensor Device:
   Name: Living Room Humidity
   Type: Sensor
   Location: Living Room
   Serial: HUM_001
   ```

### Step 3: Add Your Microcontroller

1. **Navigate to Microcontrollers**

   - Click "Microcontrollers" in the dashboard navigation
   - Click "Add New Microcontroller"

2. **Configure Your Microcontroller**
   ```
   Name: Home Sensor Hub
   Description: ESP8266 controlling living room devices
   Location: Living Room
   Board Type: ESP8266
   ```
   - Click "Create Microcontroller"
   - **Copy the API Key** - this is crucial for Arduino code

### Step 4: Arduino Library Installation

#### Option A: Arduino Library Manager

1. Open Arduino IDE
2. Go to **Tools** β†’ **Manage Libraries**
3. Search for "CircuitNotion"
4. Click **Install**

#### Option B: Manual Installation

1. Download the library ZIP from GitHub
2. In Arduino IDE: **Sketch** β†’ **Include Library** β†’ **Add .ZIP Library**
3. Select the downloaded ZIP file

#### Install Dependencies

The library requires these dependencies (install via Library Manager):

- `ArduinoJson` (6.21.3 or later)
- `WebSocketsClient` (2.3.7 or later)
- `DHT sensor library` (1.4.4 or later) - for temperature/humidity sensors

### Step 5: Arduino Code Setup

#### Basic Example

```cpp
#include <CircuitNotion.h>

// WiFi credentials
const char* ssid = "YourWiFiNetwork";
const char* password = "YourWiFiPassword";

// CircuitNotion configuration (from your dashboard)
const char* api_key = "your-microcontroller-api-key";  // From Step 3
const char* microcontroller_name = "Home Sensor Hub";   // From Step 3

// Device serials (from Step 2)
const char* light_device_serial = "LIGHT_001";
const char* temp_device_serial = "TEMP_001";

void setup() {
    Serial.begin(115200);

    // Setup WiFi
    CN.setWiFi(ssid, password);

    // Configure CircuitNotion connection
    CN.begin("iot.circuitnotion.com", 443, "/ws", api_key, microcontroller_name);

    // Map dashboard device to local pin for control
    CN.mapDigitalDevice(light_device_serial, D2, "Living Room Light");

    // Add sensor for dashboard device
    CN.addTemperatureSensor(temp_device_serial, "Living Room", 30000, []() {
        // Read your actual sensor here
        float temp = 23.5; // Replace with real sensor reading
        return SensorValue(temp, "Β°C");
    });

    // Setup callbacks
    CN.onConnection([](bool connected) {
        Serial.println(connected ? "βœ“ Connected!" : "βœ— Disconnected");
    });

    CN.onDeviceControl([](String deviceSerial, String state) {
        Serial.println("Device control: " + deviceSerial + " -> " + state);
    });

    // Connect to CircuitNotion
    CN.connect();
}

void loop() {
    CN.loop();
    delay(100);
}
```

### Step 6: Verify Everything Works

1. **Upload Your Code**

   - Upload the Arduino sketch to your ESP8266/ESP32
   - Open Serial Monitor (115200 baud)
   - Look for connection messages

2. **Check Dashboard**
   - Return to [iot.circuitnotion.com](https://iot.circuitnotion.com)
   - Go to "Microcontrollers" - your device should show as "Connected"
   - Go to "Devices" - you should see real-time sensor data
   - Try controlling devices from the dashboard

## πŸ—οΈ Architecture Overview

CircuitNotion follows a **dashboard-first** architecture:

```
Dashboard (iot.circuitnotion.com) β†’ Device Creation β†’ API Keys β†’ Arduino Connection β†’ Sensor Data
```

### Key Concepts

1. **Devices**: Physical entities registered in your dashboard (lights, sensors, etc.)
2. **Microcontrollers**: Arduino boards that interface with devices
3. **Device Mappings**: Connect dashboard devices to local microcontroller pins
4. **Sensors**: Data collectors attached to devices via microcontrollers

## πŸ”Œ Device Mapping

Map dashboard devices to local pins for automatic control:

```cpp
// Digital devices (LED, relay, etc.)
CN.mapDigitalDevice("LIGHT_001", D2, "Living Room Light");
CN.mapDigitalDevice("RELAY_001", D3, "Water Pump", true); // inverted logic

// Analog/PWM devices
CN.mapAnalogDevice("DIMMER_001", D5, "Dimmable Light");
CN.mapPWMDevice("SERVO_001", D6, "Window Servo");
```

## πŸ“Š Sensor Management

Attach sensors to dashboard devices:

```cpp
// Temperature sensor reading every 30 seconds
CN.addTemperatureSensor("TEMP_001", "Kitchen", 30000, readTemperature);

// Humidity sensor with change detection
auto* humidity = CN.addHumiditySensor("HUM_001", "Kitchen", 15000, readHumidity);
humidity->setChangeThreshold(5.0); // Only send if changed by 5%
humidity->enableChangeDetection(true);

// Custom sensor
CN.addCustomSensor("pressure", "PRESS_001", "Basement", 60000, readPressure);

// Enable/disable sensors dynamically
CN.enableSensor("temperature", "TEMP_001");
CN.disableSensor("humidity", "HUM_001");
```

## πŸ”„ Dashboard Features You Can Use

### Real-time Device Control

- Toggle lights, fans, pumps from the web dashboard
- Set analog values (dimmer levels, servo positions)
- Create automation rules and schedules

### Sensor Data Visualization

- Real-time charts and graphs
- Historical data analysis
- Export data to CSV/JSON
- Set up alerts and notifications

### Device Management

- Organize devices by location/room
- Set device names and descriptions
- Monitor device status and connectivity
- Manage device permissions

### User Management

- Share access with family/team members
- Set user permissions per device
- Activity logs and audit trails

## πŸ”§ Advanced Configuration

### Custom Server (Enterprise)

```cpp
// For self-hosted CircuitNotion instances
CN.begin("your-server.com", 443, "/ws", api_key, microcontroller_name);
```

### SSL/TLS Configuration

```cpp
// Enable/disable SSL (default: enabled)
CN.begin(host, 443, path, api_key, name, true);  // SSL enabled
CN.begin(host, 80, path, api_key, name, false);  // Plain HTTP
```

### Auto-reconnection

```cpp
// Enable auto-reconnection with custom interval
CN.enableAutoReconnect(true, 10000); // 10 second intervals
```

## πŸ“ˆ Monitoring and Diagnostics

```cpp
// Print comprehensive diagnostics
CN.printDiagnostics();
CN.printSensorStatus();
CN.printDeviceMappings();

// Get statistics
int sensorCount = CN.getSensorCount();
unsigned long totalReadings = CN.getTotalSensorReadings();
String version = CN.getLibraryVersion();
```

## 🌐 Complete API Reference

### Main Class: `CircuitNotion`

#### Configuration

- `begin(host, port, path, apiKey, microcontrollerName, useSSL=true)`
- `setWiFi(ssid, password)`
- `enableAutoReconnect(enabled, interval=5000)`

#### Connection

- `connect()`
- `disconnect()`
- `bool isConnected()`
- `bool isAuthenticated()`
- `ConnectionStatus getStatus()`

#### Device Mapping

- `mapDigitalDevice(deviceSerial, pin, name="", inverted=false)`
- `mapAnalogDevice(deviceSerial, pin, name="")`
- `mapPWMDevice(deviceSerial, pin, name="")`
- `controlLocalDevice(deviceSerial, state/value)`

#### Sensor Management

- `addTemperatureSensor(deviceSerial, location, interval, callback)`
- `addHumiditySensor(deviceSerial, location, interval, callback)`
- `addLightSensor(deviceSerial, location, interval, callback)`
- `addMotionSensor(deviceSerial, location, interval, callback)`
- `addCustomSensor(type, deviceSerial, location, interval, callback)`

#### Callbacks

- `onDeviceControl(callback)`
- `onConnection(callback)`
- `onLog(callback)`

## πŸ› οΈ Hardware Requirements

- **ESP8266** or **ESP32** microcontroller
- **WiFi connection**
- **Sensors** (DHT22, LDR, etc.) - optional
- **Actuators** (LEDs, relays, servos) - optional

## πŸ“ Complete Example Projects

### Smart Home Hub

Monitor temperature, humidity, and light levels while controlling lights and fans.

### Garden Monitoring

Track soil moisture, temperature, and automate watering systems.

### Security System

Motion detection, door sensors, and automatic lighting control.

### Industrial Monitoring

Machine temperature monitoring, production counters, and alert systems.

## πŸ› Troubleshooting

### Dashboard Issues

1. **Can't access iot.circuitnotion.com**

   - Check your internet connection
   - Try clearing browser cache
   - Contact support if site is down

2. **Device not appearing in dashboard**
   - Verify device creation in dashboard
   - Check device serial matches Arduino code
   - Ensure microcontroller is connected

### Connection Issues

1. **Arduino won't connect**

   - Verify WiFi credentials
   - Check API key copied correctly from dashboard
   - Ensure microcontroller name matches dashboard
   - Monitor Serial output for error messages

2. **Sensors not sending data**
   - Verify device serials match dashboard
   - Check sensor hardware connections
   - Confirm sensor initialization in code
   - Test sensor readings independently

### Performance Issues

1. **Memory problems**

   - Reduce sensor reading frequency
   - Enable change detection to reduce transmissions
   - Monitor free heap with `ESP.getFreeHeap()`

2. **Connection drops**
   - Enable auto-reconnect: `CN.enableAutoReconnect(true)`
   - Check WiFi signal strength
   - Verify power supply stability

## πŸ”’ Security

- Uses **WSS (WebSocket Secure)** for encrypted communication
- **API key authentication** for device authorization
- **Dashboard access control** with user permissions
- **SSL/TLS encryption** for all data transmission
- **Secure device registration** through web dashboard

## πŸ“ž Support and Community

- **Dashboard**: [iot.circuitnotion.com](https://iot.circuitnotion.com)
- **Documentation**: [docs.circuitnotion.com](https://docs.circuitnotion.com)
- **Community Forum**: [community.circuitnotion.com](https://community.circuitnotion.com)
- **GitHub Issues**: [github.com/circuitnotion/arduino-library/issues](https://github.com/circuitnotion/arduino-library/issues)
- **Email Support**: support@circuitnotion.com

## πŸ“„ License

This library is released under the MIT License. See LICENSE file for details.

---

**Start your IoT journey today!** πŸš€

1. Sign up at [iot.circuitnotion.com](https://iot.circuitnotion.com)
2. Create your devices
3. Install this library
4. Connect your Arduino
5. Control everything from your dashboard!
2025-08-09 14:43:55 +00:00