Skip to content

[PXCT-1073] Tutorial from library - Uno R4 Capacitor Tutorial #2559

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pedromsousalima
Copy link
Contributor

What This PR Changes

  • Created tutorial for touch on R4

Contribution Guidelines

Copy link

github-actions bot commented Jul 3, 2025

Preview Deployment

🚀 Preview this PR: https://68668065e403a30b6360e1ea--docs-content.netlify.app
📍 Commit SHA: 678683a

Copy link
Contributor

@TaddyHC TaddyHC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pedromsousalima , I have left some observations for the tutorial 🙂 Please check them out, I think they should be worth looking into. With the observations applied, I think it should be ready for next step.

@@ -0,0 +1,130 @@
---
title: Uno R4 Capacitor Tutorial
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Uno R4 Capacitor Tutorial
title: Uno R4 Capacitive-Touch Tutorial.

I'd like to suggest this title since it correlates more naturally with the topic and the library that the tutorial will focus on, the capacitive touch chracteristic.

Comment on lines +3 to +5
description: Learn to use the built-in capacitive sensing capabilities of the Arduino® Uno R4.
tags: [Arduino, Capacitive Sensing, Uno R4]
author: Pedro Lima
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it would be nice to add additional metadata keys that we have as well for other documentation, like:

Suggested change
description: Learn to use the built-in capacitive sensing capabilities of the Arduino® Uno R4.
tags: [Arduino, Capacitive Sensing, Uno R4]
author: Pedro Lima
difficulty: beginner
description: Learn to use the built-in capacitive sensing capabilities of the Arduino® Uno R4.
tags: [Arduino, Capacitive Sensing, Uno R4]
author: Pedro Lima
hardware:
- hardware/02.hero/boards/uno-r4-wifi
- hardware/02.hero/boards/uno-r4-minima
software:
- ide-v2
- web-editor

Comment on lines +22 to +23


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Suggestion for spacing removal

Comment on lines +32 to +34
**Arduino® UNO-R4 Minima:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the preview, here I see some broken formatting:

image

Maybe we could apply the following update:

Suggested change
**Arduino® UNO-R4 Minima:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|
**Arduino® UNO-R4 Minima:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|

Which separates the table title from the table itself

Comment on lines +47 to +49
**Arduino® UNO-R4 WiFi:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Arduino® UNO-R4 WiFi:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|
**Arduino® UNO-R4 WiFi:**
| Arduino Pin | Touch Sensor Channel (TS#) | Channel Control Index (CHAC idx) | Channel Control Bit Mask (CHAC val) |
|--------------|----------------------------|----------------------------------|-------------------------------------|

Similar to the table above

Capacitive sensing is a technology that detects changes in capacitance to determine the presence or absence of a conductive object, such as a human finger. This principle is widely used in touch-sensitive devices. The Arduino® Uno R4, both the [WiFi](https://store.arduino.cc/products/arduino-uno-r4-wifi) and [Minima](https://store.arduino.cc/products/arduino-uno-r4-minima) versions, come equipped with built-in capacitive sensing capabilities, making it easier to integrate touch inputs into your projects.

![Sensor Example](assets/Touch_Cover_001.gif)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I think we should add:

Goals

Required Hardware and Software

To show directly what are the goals of the tutorial, as well as the hardware and software that would be used so the reader knows the requirements right at the beginning

Here's a simple example to get you started with capacitive sensing on the Uno R4.
For this example we are connecting a single piece of any conductive material to the pin ```D0``` on the Board.

![How to connect](assets/HoockupGuideExample.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to move this to a separate and dedicated section, so the readers can assemble the hardware and understand how it works electrically. Then they can move to example section to upload the code and test it.


Capacitive sensing is a technology that detects changes in capacitance to determine the presence or absence of a conductive object, such as a human finger. This principle is widely used in touch-sensitive devices. The Arduino® Uno R4, both the [WiFi](https://store.arduino.cc/products/arduino-uno-r4-wifi) and [Minima](https://store.arduino.cc/products/arduino-uno-r4-minima) versions, come equipped with built-in capacitive sensing capabilities, making it easier to integrate touch inputs into your projects.

![Sensor Example](assets/Touch_Cover_001.gif)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could add this as a duplicate after the example section, so it works as a nice visual addition of what to expect or how it would work. The image placement here is good because it shows the reader from the introduction what they are expecting to learn within the tutorial, so I think it would be nice to copy this line and add it next to the example section.

| D13 | 12 | 1 | (1 << 4) |
| A1 (D15) | 21 | 2 | (1 << 5) |
| A2 (D16) | 22 | 2 | (1 << 6) |
| LOVE_BUTTON | 0 | 0 | (1 << 0) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the lovebutton is a pin at bottom side of the minima right?

Comment on lines +129 to +130
The built-in capacitive sensing capabilities of the Arduino® Uno R4 provide an excellent way to add touch inputs to your projects. By leveraging the Arduino_CapacitiveTouch library, you can easily integrate touch-sensitive features, enhancing the interactivity and functionality of your designs. Whether you're building a simple touch interface or a more complex interactive system, the Uno R4's capacitive sensing features offer a versatile and user-friendly solution.
Remember to experiment with threshold values and consider the environment where your project will be used, as factors like humidity and nearby electronics can affect sensitivity. With practice, you'll develop an intuitive understanding of how to tune these sensors for optimal performance in your specific applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here it would be nice to be more concise if possible, for example, like:

Suggested change
The built-in capacitive sensing capabilities of the Arduino® Uno R4 provide an excellent way to add touch inputs to your projects. By leveraging the Arduino_CapacitiveTouch library, you can easily integrate touch-sensitive features, enhancing the interactivity and functionality of your designs. Whether you're building a simple touch interface or a more complex interactive system, the Uno R4's capacitive sensing features offer a versatile and user-friendly solution.
Remember to experiment with threshold values and consider the environment where your project will be used, as factors like humidity and nearby electronics can affect sensitivity. With practice, you'll develop an intuitive understanding of how to tune these sensors for optimal performance in your specific applications.
Capacitive sensing on the Arduino UNO R4 lets you add intuitive touch controls with minimal hardware, simply pair the board with the `Arduino_CapacitiveTouch` library. Tune the detection threshold for your environment (humidity, nearby electronics, etc.), and you can quickly scale from a single touch button to richer, multi-point interfaces.

It would also be nice to add Next Steps section if possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants