Skip to content

Update Arduino Language Reference links [HC-1615] #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ https://www.ups.com/it/en/support/contact-us.page
https://www.dhl.com/us-en/home/customer-service.html
https://www.dhl.com/us-en/home/ecommerce/shipping-services/international-shipping-services.html
https://www.tindie.com/products/ataradov/cmsis-dap-compliant-swd-debugger/
https://www.arduino.cc/reference/en/libraries/arduino_bmi270_bmm150/

# Too many redirects

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ For these reasons, we highly recommend updating to the latest library version to

## Action Required

Update the component's library to [ArduinoModbus 1.0.9](https://github.com/arduino-libraries/ArduinoModbus/releases/tag/1.0.9) or later as described by the official documentation available [here](https://www.arduino.cc/reference/en/libraries/arduinomodbus/).
Update the component's library to [ArduinoModbus 1.0.9](https://github.com/arduino-libraries/ArduinoModbus/releases/tag/1.0.9) or later as described by the official documentation available [here](https://docs.arduino.cc/libraries/arduinomodbus/).

## Additional information

For further information visit the following links:

* [https://www.arduino.cc/reference/en/libraries/arduinomodbus/](https://www.arduino.cc/reference/en/libraries/arduinomodbus/)
* [https://docs.arduino.cc/libraries/arduinomodbus/](https://docs.arduino.cc/libraries/arduinomodbus/)
* [https://nvd.nist.gov/vuln/detail/CVE-2019-14463](https://nvd.nist.gov/vuln/detail/CVE-2019-14463)
* [https://nvd.nist.gov/vuln/detail/CVE-2022-0367](https://nvd.nist.gov/vuln/detail/CVE-2022-0367)
* [https://github.com/arduino-libraries/ArduinoModbus/releases/tag/1.0.9](https://github.com/arduino-libraries/ArduinoModbus/releases/tag/1.0.9)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ id: 13459093156764

4. Fully [delete the device](https://support.arduino.cc/hc/en-us/articles/360018324700), then add it again as a new device. For detailed instructions, see [Add and connect a device to Arduino Cloud](https://support.arduino.cc/hc/en-us/articles/360016495559).

5. Test your setup with an example from the [ArduinoIoTCloud library](https://www.arduino.cc/reference/en/libraries/arduinoiotcloud/). Upload using Arduino IDE or the [Cloud Editor](https://support.arduino.cc/hc/en-us/articles/13809101080732-Open-the-Cloud-Editor).
5. Test your setup with an example from the [ArduinoIoTCloud library](https://docs.arduino.cc/libraries/arduinoiotcloud/). Upload using Arduino IDE or the [Cloud Editor](https://support.arduino.cc/hc/en-us/articles/13809101080732-Open-the-Cloud-Editor).

6. Check your device's power supply. Avoid using a USB hub, and instead connect the board directly to a USB port or another power source with a reliable cable to ensure sufficient power.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Learn how to troubleshoot servos that are not moving or moving erratically.

1. **Check connections:** Make sure the connection between the servo and the board is correct. Check the [Basic servo control tutorial](https://docs.arduino.cc/tutorials/generic/basic-servo-control) for a circuit diagram example.

2. **Verify pin configuration:** Confirm that you've connected the servo to the same pin referenced in the code. For example, if you are using the [servo library](https://www.arduino.cc/reference/en/libraries/servo/), the code might inlcude a line such as `myservo.attach(9)` to link the servo to a specific pin on the board. In this case, the **signal** input on the servo should be connected to the pin 9 on the board.
2. **Verify pin configuration:** Confirm that you've connected the servo to the same pin referenced in the code. For example, if you are using the [servo library](https://docs.arduino.cc/libraries/servo/), the code might inlcude a line such as `myservo.attach(9)` to link the servo to a specific pin on the board. In this case, the **signal** input on the servo should be connected to the pin 9 on the board.

3. **Power considerations:** Servo motors draw significant power, and the board might not supply enough energy. If you need to drive more than one or two servos, you may need to power them from a separate supply (i.e. not the 5V pin on your Arduino). Make sure the grounds of the Arduino and the external power supply are connected. Check the diagram below for an example circuit:

![Two servo motors connected to the digital pins of an Arduino board, powered through a external battery connected to a breadboard.](img/2-servos-set-up-diagram.png)

## Further reading

* <a class="link-external" href="https://www.arduino.cc/reference/en/libraries/servo/">Servo library reference</a>
* <a class="link-external" href="https://docs.arduino.cc/libraries/servo/">Servo library reference</a>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In this article:

## Before running the tests

1. Install the [ArduinoMotorCarrier library](https://www.arduino.cc/reference/en/libraries/arduinomotorcarrier/). (See [Add libraries to Arduino IDE](https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE) for instructions)
1. Install the [ArduinoMotorCarrier library](https://docs.arduino.cc/libraries/arduinomotorcarrier/). (See [Add libraries to Arduino IDE](https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE) for instructions)
2. Connect the Nano 33 IoT board to the Nano Motor Carrier.

![The Nano 33 IoT board plugged to the Arduino Nano Motor Carrier](img/Nano33IoT-plug.png)
Expand Down
4 changes: 2 additions & 2 deletions content/Hardware Support/Generic/About-the-AREF-pin.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Not all boards have an enabled AREF pin, and it doesn't work the same way on all
<li>Arduino megaAVR Boards (Uno WiFi Rev2)</li>
</ul>
<td>
<p>External reference voltage can be read from the AREF pin. Enable it by calling <a href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/">analogReference()</a> with the appropriate option for your board, i.e. <code>analogReference(EXTERNAL)</code> for AVR boards.</p>
<blockquote><b>Note:</b> To avoid damaging your board, read the library reference's <a href="https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/#_notes_and_warnings">notes and warnings</a> section before using an external reference voltage.</blockquote>
<p>External reference voltage can be read from the AREF pin. Enable it by calling <a href="https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReference/">analogReference()</a> with the appropriate option for your board, i.e. <code>analogReference(EXTERNAL)</code> for AVR boards.</p>
<blockquote><b>Note:</b> To avoid damaging your board, read the library reference's <a href="https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReference/#notes-and-warnings">notes and warnings</a> section before using an external reference voltage.</blockquote>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The following boards have Bluetooth Low Energy connectivity:
* UNO WiFi Rev2
* UNO R4 WiFi

Enable it with the [ArduinoBLE library](https://www.arduino.cc/reference/en/libraries/arduinoble/).
Enable it with the [ArduinoBLE library](https://docs.arduino.cc/libraries/arduinoble/).

Although the communication modules on these boards can also use Bluetooth _Classic_, it is not currently supported by official firmware or libraries.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Change the Bluetooth® broadcast name"
id: 360018922199
---

When using the [ArduinoBLE](https://www.arduino.cc/reference/en/libraries/arduinoble/) library to enable Bluetooth Low Energy communication on an Arduino board, the broadcasted name is set by the [setLocalName()](https://www.arduino.cc/reference/en/libraries/arduinoble/ble.setlocalname/) function.
When using the [ArduinoBLE](https://docs.arduino.cc/libraries/arduinoble/) library to enable Bluetooth Low Energy communication on an Arduino board, the broadcasted name is set by the `BLE.setLocalName()` function.

For example, you can set the name to _MyArduinoDevice_.

Expand All @@ -15,5 +15,5 @@ If using an example, first check if `BLE.setLocalName()` is already called somew

## Further reading

* [ArduinoBLE library](https://www.arduino.cc/reference/en/libraries/arduinoble/)
* [ArduinoBLE library](https://docs.arduino.cc/libraries/arduinoble/)
* [Connecting Nano 33 BLE Devices over Bluetooth<sup>®</sup>](https://docs.arduino.cc/tutorials/nano-33-ble-sense/ble-device-to-device)
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Some Arduino boards come with an embedded Inertial Measurement Unit (IMU) in the

| Library | Boards |
|-------------------------------------------------------------------------------------|-------------------------------------------------------|
| [Arduino_LSM9DS1](https://www.arduino.cc/reference/en/libraries/arduino_lsm9ds1/) | Arduino Nano 33 BLE Sense |
| [Arduino_LSM6DS3](https://www.arduino.cc/reference/en/libraries/arduino_lsm9ds1/) | Arduino Nano 33 IoT <br>Arduino Uno WiFi Rev2 |
| [Arduino_LSM6DSOX](https://www.arduino.cc/reference/en/libraries/arduino_lsm6dsox/) | Arduino Nano RP2040 Connect <br>Arduino Nicla Vision |
| [MKRIMU](https://www.arduino.cc/reference/en/libraries/mkrimu) | Arduino MKR IMU Shield |
| [Arduino_LSM9DS1](https://docs.arduino.cc/libraries/arduino_lsm9ds1/) | Arduino Nano 33 BLE Sense |
| [Arduino_LSM6DS3](https://docs.arduino.cc/libraries/arduino_lsm9ds1/) | Arduino Nano 33 IoT <br>Arduino Uno WiFi Rev2 |
| [Arduino_LSM6DSOX](https://docs.arduino.cc/libraries/arduino_lsm6dsox/) | Arduino Nano RP2040 Connect <br>Arduino Nicla Vision |
| [MKRIMU](https://docs.arduino.cc/libraries/mkrimu/) | Arduino MKR IMU Shield |

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Learn how to use PWM (Pulse Width Modulation) output with Arduino.

## Using PWM in your sketch

Add PWM output to your sketch using the [analogWrite()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/) function.
Add PWM output to your sketch using the [analogWrite()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogWrite/) function.

Here's a basic example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ id: 4894711239708

You can easily connect a liquid crystal display (LCD) with an Arduino to display data.

The [LiquidCrystal library](https://www.arduino.cc/reference/en/libraries/liquidcrystal/) allows you to control LCD displays based on the Hitachi HD44780 chipset (which is found on most text-based LCDs).
The [LiquidCrystal library](https://docs.arduino.cc/libraries/liquidcrystal/) allows you to control LCD displays based on the Hitachi HD44780 chipset (which is found on most text-based LCDs).

See [this guide](https://docs.arduino.cc/learn/electronics/lcd-displays) on how to wire an LCD to an Arduino board and use the LiquidCrystal library
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The microcontroller on the Nano RP2040 Connect has four analog pins, connected t

**Pins A0–A3** are connected to the board's microcontroller (Raspberry Pi RP2040). These pins can be used like analog pins on most other Arduino boards:

* Write to a pin with [analogWrite()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/)
* Read from a pin with [analogRead()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/)
* Write to a pin with [analogWrite()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogWrite/)
* Read from a pin with [analogRead()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogRead/)

If possible, try to use these pins for your project.

Expand Down Expand Up @@ -51,7 +51,7 @@ _*With WIFINina firmware 1.4.8 or earlier, the range for these pins are 0.0–1.

## Increase the analogRead resolution

The `analogRead()` function returns 10-bit values (0–1023) by default. You can increase the resolution to 12-bit (0–4095) with the [analogReadResolution()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogreadresolution/) function. Just add this code to your `setup()` function:
The `analogRead()` function returns 10-bit values (0–1023) by default. You can increase the resolution to 12-bit (0–4095) with the [analogReadResolution()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReadResolution/) function. Just add this code to your `setup()` function:

```arduino
analogReadResolution(12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ You can easily access the pins using these predefined constants:
* `LEDG` – green channel pin (P23)
* `LEDB` – blue channel pin (P24)

You can then set the value for each channel with the [`digitalWrite(pin, value)`](https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/) function:
You can then set the value for each channel with the [`digitalWrite(pin, value)`](https://docs.arduino.cc/language-reference/en/functions/digital-io/digitalwrite/) function:

* `digitalWrite(LEDR, LOW)` – turn the RED LED **on**.
* `digitalWrite(LEDR, HIGH)` – turn the RED LED **off**.

> [!IMPORTANT]
> The RGB pins are **active-low**. This means that the pin is activated (turning on the LED) when the voltage is low.

To control the brightness or produce different colors, use the [`analogWrite(pin, value)`](https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/) function. For the `value` parameter, you can use a number from `0` to `255`. Because the RGB pins are active-low, a value of `0` will activate the pin's LED at full brightness, while a value of `255` turns it off completely.
To control the brightness or produce different colors, use the [`analogWrite(pin, value)`](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogWrite/) function. For the `value` parameter, you can use a number from `0` to `255`. Because the RGB pins are active-low, a value of `0` will activate the pin's LED at full brightness, while a value of `255` turns it off completely.

* `analogWrite(LEDG, 255)` – turn the GREEN LED **off**.
* `analogWrite(LEDB, 128)` – turn the RED channel **off**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The Arduino Nano 33 BLE has the ability to change its analog read resolution inc

To achieve this there is another function called `analogReadResolution()` that sets the size (in bits) of the value returned by `analogRead()`.

See the [analogReadResolution()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogreadresolution/) page for more information on how to change the ADC resolution.
See the [analogReadResolution()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReadResolution/) page for more information on how to change the ADC resolution.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ After making the modifications, save the changes and upload the modified sketch

### Learn more

* [Library documentation for Arduino_BMI270_BMM150](https://www.arduino.cc/reference/en/libraries/arduino_bmi270_bmm150/)
* [Library documentation for Arduino_BMI270_BMM150](https://docs.arduino.cc/libraries/arduino_hs300x/)
* [Nano 33 BLE Sense Rev2 Cheat Sheet – IMU](https://docs.arduino.cc/tutorials/nano-33-ble-sense-rev2/cheat-sheet#imu)

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "About ADC reference voltage on Portenta H7"
id: 4753980038812
---

The **analog-to-digital converter** (ADC) on Portenta H7 switches between internal and external reference voltage automatically, so unlike some other boards, [analogReference()](https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/) should **not** be used.
The **analog-to-digital converter** (ADC) on Portenta H7 switches between internal and external reference voltage automatically, so unlike some other boards, [analogReference()](https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReference/) should **not** be used.

<a id="internal-reference"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Use the library for Portenta Machine Control"
id: 4404060840338
---

The **[Arduino_PortentaMachineControl](https://www.arduino.cc/reference/en/libraries/arduino_portentamachinecontrol/)** library enables efficient management of Portenta Machine Control features.
The **[Arduino_PortentaMachineControl](https://docs.arduino.cc/libraries/arduino_portentamachinecontrol/)** library enables efficient management of Portenta Machine Control features.

> [!IMPORTANT]
> This library has officially replaced the older **Arduino_MachineControl** library.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The UNO R4 WiFi uses [CmBacktrace](https://github.com/armink/CmBacktrace) to pri

Follow these steps:

1. Ensure that a serial connection must be initiated before the error occurs, by calling [Serial.begin()](https://www.arduino.cc/reference/en/language/functions/communication/serial/begin/) in your sketch. You can include this code inside the beginning of the `setup()` function:
1. Ensure that a serial connection must be initiated before the error occurs, by calling [Serial.begin()](https://docs.arduino.cc/language-reference/en/functions/communication/Serial/begin/) in your sketch. You can include this code inside the beginning of the `setup()` function:

```arduino
Serial.begin(115200);
Expand Down Expand Up @@ -109,7 +109,7 @@ Follow these steps:
2. Open the sketch in Arduino IDE and find the line number from the previous step (the number is displayed to the left of each line).
3. Analyze the row where the error occurred and try to understand what may be triggering the error.

* If you're not sure, use the [Serial.println()](https://www.arduino.cc/reference/en/language/functions/communication/serial/println/) function to output the values of any variables being used. Then upload the sketch again, and use the serial output to see what the states of those variables were before the error occurred.
* If you're not sure, use the [Serial.println()](https://docs.arduino.cc/language-reference/en/functions/communication/Serial/println/) function to output the values of any variables being used. Then upload the sketch again, and use the serial output to see what the states of those variables were before the error occurred.

* To see from where the function was called, look at the preceding function call in the `addr2line` output.

Expand Down
2 changes: 1 addition & 1 deletion content/Hardware Support/UNO/Update-Modulino-firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this article:

2. Connect the board to your computer and open Arduino IDE.

3. [Go to the Library Manager](https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE) and install the [Modulino](https://www.arduino.cc/reference/en/libraries/modulino/) and [ArduinoGraphics](https://www.arduino.cc/reference/en/libraries/arduinographics/) libraries.
3. [Go to the Library Manager](https://support.arduino.cc/hc/en-us/articles/5145457742236-Add-libraries-to-Arduino-IDE) and install the [Modulino](https://docs.arduino.cc/libraries/modulino/) and [ArduinoGraphics](https://docs.arduino.cc/libraries/arduinographics/) libraries.

4. In the top menu bar, open **File > Examples > Modulino > Utililities > FirmwareUpdater**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ UNO R4 boards maintain the same mechanical and electrical compatibility, allowin

### Can I use my sketch developed for UNO R3 with an UNO R4 board?

Yes, if your sketch was developed using the [Arduino API](https://www.arduino.cc/reference/en/).
Yes, if your sketch was developed using the [Arduino API](https://docs.arduino.cc/language-reference/).

If your sketch uses instructions specific to the AVR architecture, they will have to be changed to ensure compatibility.

### Are libraries for UNO R3 also compatible with the UNO R4 boards?

Libraries that are based on the [Arduino API](https://www.arduino.cc/reference/en/) will work as is.
Libraries that are based on the [Arduino API](https://docs.arduino.cc/language-reference/) will work as is.

Libraries that use AVR-specific instructions are not compatible with the architecture of UNO R4 boards. However, there are libraries that have already been ported as part of our early adopters program.

Expand Down
Loading
Loading