JRPLK

Touching the Stars

 
Overview
This project describes
a touch input solution implemented using the TTP233. This solution allows for touch-based starry sky and river table effects. Additionally, it utilizes the ESP8266 to improve RGB support, enabling more effects than typical solutions. For example, it can display images independently without touch. Furthermore, RGB can be used for color display. The project is licensed under the MIT license.
 
It comprises three modules, each usable independently: a touch module , an RGB control module, and an RGB connection module. This is the first public release of this project , and it is the author's original work. The project has not won any awards in other competitions. The hardware circuit testing is currently running smoothly. The design principle uses the ESP32S3 as the main control chip, which receives signals from the TTP223 to illuminate the corresponding RGB elements. Compared to directly using the TTP223, this allows for richer functionality and a more immersive experience. The software uses the Adafruit_MCP23X17 and Adafruit_NeoPixel libraries. Adafruit_MCP23X17 supports I2C for the 23017, and Adafruit_NeoPixel is used for RGB display. void setupmcp() {     // SCL SDA configuration     static TwoWire mcpconfig(0);     if (!mcpconfig.begin(SDAPIN, SCLPIN))     {         Serial.println("initPins Error.");     }     size_t i = 0;     for (auto &ite : mcp)     {         if (ite.begin_I2C(mcpaddress[i], &mcpconfig))         {             /*for (uint8_t i = 0; i             {                 ite.pinMode(i, OUTPUT);             }*/             Serial.print("init mcp successed!address:");             Serial.println(mcpaddress[i]);         }         else         {             Serial.print("Error init mcp!address:");             Serial.println(mcpaddress[i]);         }         ++i;     } } Then check for input changes in the loop and update the RGB effect static std::array, 4> gpiovalue = {0, 0, 0, 0};     int idx = 0;     for (auto &ite : mcp)     {         std::bitset gpio = ite.readGPIOAB();         if (gpiovalue[idx] != gpio)         {             gpiovalue[idx] = gpio;             Serial.println(gpio.to_string().c_str());             for (uint16_t i = 0; i             {                 if (gpio[i] == HIGH)                 {                     rgb.setRGB(i + offset, distribRGB(engine), distribRGB(engine), distribRGB(engine));                 }                 else                 {                     rgb.setRGB(i + offset);                 }             }         }         ++idx;         offset += 16;     Physical Demonstration Tips: Provide images of the actual product, with descriptions if desired. Design Notes: The 0-ohm resistor used for the MCP23017 in the schematic diagram needs to be connected according to actual requirements. Without connection, it will be all high level, resulting in the module address being 0b0100111, or 0x27. The addresses of different modules cannot be the same. Touch Module Circuit: In actual use, some functions can be omitted. For example, if driving the LED is not needed, the LED driving part can be omitted. Other Demonstration Videos: Upload the demonstration video as an attachment. Attachments can only be uploaded to a maximum size of 50MB. Files larger than 50MB can be placed on other cloud storage or video websites; simply include the link here. Project Attachments: Entries participating in the event must upload the relevant program attachments to an open-source platform or personal code storage cloud. Attachments can be uploaded to a maximum size of 50MB (please do not upload to the LCSC workspace, as there are restrictions).

 





 


 
































































 








参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 18:43:12

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号