Skip to content

Commit c4c119b

Browse files
doc: update docs/README.md
1 parent ce11f9b commit c4c119b

File tree

2 files changed

+88
-2
lines changed

2 files changed

+88
-2
lines changed

docs/README.md

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,93 @@
44
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_MachineControl/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_MachineControl/actions/workflows/compile-examples.yml)
55
[![Spell Check status](https://github.com/arduino-libraries/Arduino_MachineControl/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_MachineControl/actions/workflows/spell-check.yml)
66

7-
[![License](https://img.shields.io/badge/License-LGPLv3-blue.svg)](https://github.com/arduino-libraries/Arduino_MachineControl/blob/master/LICENSE.txt)
7+
[![License](https://img.shields.io/badge/License-LGPLv2.1-blue.svg)](https://github.com/arduino-libraries/Arduino_MachineControl/blob/master/LICENSE.txt)
8+
9+
The Portenta Machine Control Library is a C++ library designed to efficiently manage the functionalities of the Portenta Machine Control board. It provides extensive support for inputs such as digital, analog, and encoder signals, while offering outputs including digital and analog signals. This library also menages communication through protocols like CAN-BUS and serial ports, and allows connectivity via Ethernet, USB, Wi-Fi, and Bluetooth Low Energy.
10+
11+
The library empowers users to easily initialize, control, and access the diverse functionalities of the Portenta Machine Control, enhancing its capability and adaptability for industrial applications.
812

913
📚 For more information about this library please visit us at:
10-
https://www.arduino.cc/reference/en/libraries/arduino_machinecontrol
14+
https://www.arduino.cc/reference/en/libraries/arduino_machinecontrol
15+
16+
## Features
17+
18+
- Manages input signals, including:
19+
- 8 digital inputs at 24Vdc
20+
- 2 channels for encoder readings
21+
- 3 analog inputs for PT100/J/K temperature probes
22+
- 3 analog inputs for 4-20mA/0-10V/NTC signals
23+
24+
- Manages output signals, including:
25+
- 8 digital outputs at 24Vdc
26+
- 4 analog outputs at 0-10V
27+
28+
- Provides control for other I/O:
29+
- 12 programmable digital I/O at 24V
30+
31+
- Supports various Communication Protocols:
32+
- CAN-BUS
33+
- Serial protocols (RS232/RS422/RS485)
34+
35+
- Supports versatile connectivity options:
36+
- Ethernet
37+
- USB
38+
- Bluetooth Low Energy
39+
- Wi-Fi
40+
41+
- Handles RTC (Real-Time Clock) functionality
42+
43+
## Usage
44+
45+
To use this library, you must have a properly powered Portenta Machine Control board running at 24V. Once you have ensured the correct power supply and established the connection, you can include the machine control library in your Arduino sketch and use its functions to manage the board features.
46+
47+
Here is a minimal example to control a digital output:
48+
49+
```cpp
50+
// Include the Arduino MachineControl library
51+
#include <Arduino_MachineControl.h>
52+
53+
void setup() {
54+
// Initialize the digital outputs module of the MachineControl library
55+
MachineControl_DigitalOutputs.begin();
56+
}
57+
58+
void loop() {
59+
// Turn on the digital output at channel 0
60+
MachineControl_DigitalOutputs.write(0, HIGH);
61+
delay(1000);
62+
// Turn off the digital output at channel 0
63+
MachineControl_DigitalOutputs.write(0, LOW);
64+
delay(1000);
65+
}
66+
```
67+
68+
## Examples
69+
70+
- **Analog_input_0_10V:** This example demonstrates how to read analog input signals in the 0-10V range.
71+
- **Analog_input_4_20mA:** This example demonstrates how to read analog input signals in the 4-20mA range.
72+
- **Analog_input_NTC:** This example shows reading analog input signals from NTC temperature probes.
73+
- **Analog_Out:** This example shows how to control analog output signals.
74+
- **ReadCan:** This example demonstrates how to read data using the CAN-BUS communication protocol.
75+
- **WriteCan:** This example demonstrates how to send data using the CAN-BUS communication protocol.
76+
- **Digital_output:** This example shows how to control digital output signals.
77+
- **Digital_input:** This example shows how to read digital input signals.
78+
- **GPIO_programmable:** This example demonstrates the usage of programmable digital I/O pins.
79+
- **Encoders:** This example shows how to work with encoder readings.
80+
- **Ethernet:** This example shows how to establish Ethernet communication and connects to a website.
81+
- **RS232:** This example demonstrates serial communication using the RS232 protocol.
82+
- **RS485_fullduplex:** This example demonstrates full-duplex serial communication using the RS485 protocol.
83+
- **RS485_halfduplex:** This example demonstrates half-duplex serial communication using the RS485 protocol.
84+
- **RTC:** This example shows how to interact with the Real-Time Clock functionality.
85+
- **RTC_Alarm:** This example demonstrates how to set up and utilize RTC alarms.
86+
- **Temp_probes_RTD:** This example demonstrates the temperature probe readings using RTD sensors.
87+
- **Temp_probes_Thermocouples:** This example demonstrates the temperature probe readings using thermocouple sensors.
88+
- **USB_host:** This example shows the USB host functionality.
89+
90+
## API
91+
92+
The API documentation can be found [here](./api.md).
93+
94+
## License
95+
96+
This library is released under the [LGPLv2.1 license](https://github.com/arduino-libraries/Arduino_MachineControl/blob/master/LICENSE.txt).

docs/api.md

Whitespace-only changes.

0 commit comments

Comments
 (0)