![]() |
VOOZH | about |
dotnet add package nanoFramework.Iot.Device.Ft6xx6x --version 1.2.863
NuGet\Install-Package nanoFramework.Iot.Device.Ft6xx6x -Version 1.2.863
<PackageReference Include="nanoFramework.Iot.Device.Ft6xx6x" Version="1.2.863" />
<PackageVersion Include="nanoFramework.Iot.Device.Ft6xx6x" Version="1.2.863" />Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Ft6xx6x" />Project file
paket add nanoFramework.Iot.Device.Ft6xx6x --version 1.2.863
#r "nuget: nanoFramework.Iot.Device.Ft6xx6x, 1.2.863"
#:package nanoFramework.Iot.Device.Ft6xx6x@1.2.863
#addin nuget:?package=nanoFramework.Iot.Device.Ft6xx6x&version=1.2.863Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Ft6xx6x&version=1.2.863Install as a Cake Tool
The FT6xx6x are touch screens controllers. M5Core2 has a FT6336U. This driver supports the variants FT6236G, FT6336G , FT6336U and FT6426. The sample has been built and tested with a M5Core2.
Important: make sure you properly setup the I2C pins especially for ESP32 before creating the I2cDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:
//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the I2C GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(22, DeviceFunction.I2C1_CLOCK);
For other devices like STM32, please make sure you're using the preset pins for the I2C bus you want to use.
Note: this sample requires a M5Core2. If you want to use another device, just remove all the related nugets.
M5Core2.InitializeScreen();
I2cConnectionSettings settings = new(1, Ft6xx6x.DefaultI2cAddress);
using I2cDevice device = I2cDevice.Create(settings);
using GpioController gpio = new();
using Ft6xx6x sensor = new(device);
var ver = sensor.GetVersion();
Debug.WriteLine($"version: {ver}");
sensor.SetInterruptMode(false);
Debug.WriteLine($"Period active: {sensor.PeriodActive}");
Debug.WriteLine($"Period active in monitor mode: {sensor.MonitorModePeriodActive}");
Debug.WriteLine($"Time to enter monitor: {sensor.MonitorModeDelaySeconds} seconds");
Debug.WriteLine($"Monitor mode: {sensor.MonitorModeEnabled}");
Debug.WriteLine($"Proximity sensing: {sensor.ProximitySensingEnabled}");
gpio.OpenPin(39, PinMode.Input);
// This will enable an event on GPIO39 on falling edge when the screen if touched
gpio.RegisterCallbackForPinValueChangedEvent(39, PinEventTypes.Falling, TouchInterrupCallback);
while (true)
{
Thread.Sleep(20);
}
void TouchInterrupCallback(object sender, PinValueChangedEventArgs pinValueChangedEventArgs)
{
Debug.WriteLine("Touch interrupt");
var points = sensor.GetNumberPoints();
if (points == 1)
{
var point = sensor.GetPoint(true);
// Some controllers supports as well events, you can get access to them as well thru point.Event
Debug.WriteLine($"ID: {point.TouchId}, X: {point.X}, Y: {point.Y}, Weight: {point.Weigth}, Misc: {point.Miscelaneous}");
}
else if (points == 2)
{
var dp = sensor.GetDoublePoints();
Debug.WriteLine($"ID: {dp.Point1.TouchId}, X: {dp.Point1.X}, Y: {dp.Point1.Y}, Weight: {dp.Point1.Weigth}, Misc: {dp.Point1.Miscelaneous}");
Debug.WriteLine($"ID: {dp.Point2.TouchId}, X: {dp.Point2.X}, Y: {dp.Point2.Y}, Weight: {dp.Point2.Weigth}, Misc: {dp.Point2.Miscelaneous}");
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net net is compatible. |
Showing the top 1 NuGet packages that depend on nanoFramework.Iot.Device.Ft6xx6x:
| Package | Downloads |
|---|---|
|
nanoFramework.M5Core2
This package includes the nanoFramework.M5Core2 assembly for .NET nanoFramework C# projects. |
Showing the top 1 popular GitHub repositories that depend on nanoFramework.Iot.Device.Ft6xx6x:
| Repository | Stars |
|---|---|
|
nanoframework/nanoFramework.M5Stack
📦 Board support package for M5Stack, M5StickC and M5StickCPlus for .NET nanoFramework
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0-preview.86 | 59 | 6/1/2026 |
| 2.0.0-preview.81 | 74 | 5/27/2026 |
| 2.0.0-preview.68 | 99 | 5/18/2026 |
| 2.0.0-preview.63 | 66 | 5/13/2026 |
| 2.0.0-preview.57 | 84 | 5/11/2026 |
| 2.0.0-preview.50 | 57 | 5/4/2026 |
| 2.0.0-preview.41 | 70 | 4/27/2026 |
| 2.0.0-preview.33 | 58 | 4/20/2026 |
| 2.0.0-preview.19 | 105 | 3/11/2026 |
| 2.0.0-preview.15 | 68 | 3/9/2026 |
| 1.2.863 | 1,951 | 4/2/2025 |
| 1.2.855 | 499 | 3/12/2025 |
| 1.2.814 | 858 | 2/25/2025 |
| 1.2.782 | 659 | 2/4/2025 |
| 1.2.774 | 349 | 2/4/2025 |
| 1.2.769 | 293 | 2/4/2025 |
| 1.2.753 | 435 | 1/31/2025 |
| 1.2.666 | 1,233 | 10/16/2024 |
| 1.2.652 | 636 | 9/27/2024 |
| 1.2.615 | 1,067 | 8/10/2024 |