nanoFramework.Iot.Device.Ft6xx6x
1.2.863
Prefix Reserved
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" />
<PackageReference Include="nanoFramework.Iot.Device.Ft6xx6x" />
paket add nanoFramework.Iot.Device.Ft6xx6x --version 1.2.863
#r "nuget: nanoFramework.Iot.Device.Ft6xx6x, 1.2.863"
#addin nuget:?package=nanoFramework.Iot.Device.Ft6xx6x&version=1.2.863
#tool nuget:?package=nanoFramework.Iot.Device.Ft6xx6x&version=1.2.863
Ft6xx6x/Ft6336GU - Touch screen controller
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.
Documentation
- You can find the registers here.
- More information on the touch controller, events, gesture.
Usage
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 is compatible. |
-
- nanoFramework.CoreLibrary (>= 1.17.11)
- nanoFramework.Graphics.Core (>= 1.2.45)
- nanoFramework.System.Device.I2c (>= 1.1.29)
NuGet packages (1)
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. |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on nanoFramework.Iot.Device.Ft6xx6x:
Repository | Stars |
---|---|
nanoframework/nanoFramework.IoT.Device
📦 This repo includes .NET nanoFramework implementations for various sensors, chips, displays, hats and drivers
|
|
nanoframework/nanoFramework.M5Stack
:package: Board support package for M5Stack, M5StickC and M5StickCPlus for .NET nanoFramework
|
Version | Downloads | Last updated |
---|---|---|
1.2.863 | 152 | 4/2/2025 |
1.2.855 | 244 | 3/12/2025 |
1.2.814 | 460 | 2/25/2025 |
1.2.782 | 409 | 2/4/2025 |
1.2.774 | 153 | 2/4/2025 |
1.2.769 | 111 | 2/4/2025 |
1.2.753 | 229 | 1/31/2025 |
1.2.666 | 902 | 10/16/2024 |
1.2.652 | 351 | 9/27/2024 |
1.2.615 | 666 | 8/10/2024 |
1.2.422 | 2,122 | 11/9/2023 |
1.2.420 | 137 | 11/9/2023 |
1.2.316 | 2,482 | 5/16/2023 |
1.2.278 | 877 | 3/29/2023 |
1.2.204 | 3,750 | 12/29/2022 |
1.2.141 | 2,456 | 10/25/2022 |
1.2.82 | 3,744 | 9/14/2022 |
1.1.113.2032 | 8,364 | 6/23/2022 |
1.1.28 | 7,212 | 4/26/2022 |
1.1.25 | 800 | 4/25/2022 |
1.1.24 | 804 | 4/24/2022 |
1.1.23 | 791 | 4/23/2022 |
1.1.22 | 1,114 | 4/22/2022 |
1.1.21 | 470 | 4/21/2022 |
1.1.18 | 1,096 | 4/21/2022 |
1.1.17 | 795 | 4/20/2022 |
1.1.11 | 471 | 4/19/2022 |
1.1.7 | 1,093 | 4/18/2022 |
1.1.6 | 813 | 4/17/2022 |
1.1.5 | 807 | 4/16/2022 |
1.1.4 | 820 | 4/15/2022 |
1.1.1 | 476 | 4/14/2022 |
1.0.300 | 2,069 | 3/31/2022 |
1.0.21-preview.116 | 161 | 3/25/2022 |
1.0.21-preview.38 | 346 | 1/31/2022 |
1.0.21-preview.35 | 201 | 1/30/2022 |
1.0.21-preview.34 | 167 | 1/29/2022 |
1.0.21-preview.33 | 165 | 1/28/2022 |
1.0.21-preview.29 | 162 | 1/28/2022 |
1.0.21-preview.28 | 181 | 1/28/2022 |
1.0.21-preview.26 | 173 | 1/27/2022 |
1.0.21-preview.24 | 159 | 1/27/2022 |
1.0.21-preview.23 | 163 | 1/27/2022 |
1.0.21-preview.22 | 163 | 1/27/2022 |
1.0.21-preview.20 | 166 | 1/27/2022 |
1.0.21-preview.17 | 155 | 1/26/2022 |
1.0.21-preview.16 | 171 | 1/25/2022 |
1.0.21-preview.7 | 154 | 1/22/2022 |
1.0.21-preview.5 | 161 | 1/21/2022 |
1.0.21-preview.3 | 159 | 1/21/2022 |
1.0.21-preview.2 | 159 | 1/21/2022 |
1.0.21-preview.1 | 155 | 1/21/2022 |
1.0.20 | 505 | 1/19/2022 |
1.0.15 | 475 | 1/15/2022 |
1.0.10 | 330 | 1/11/2022 |
1.0.1 | 519 | 12/28/2021 |