Skip to content

Seeed-Studio/Seeed_QTouch

Repository files navigation

Seeed QTouch Build Status

Grove-Q Touch Sensor

LED Bar, common in volume display, is a common sensor component to display analog value. You can use a row of discrete LED lights to make division of this effect, you can also use our element mentioned here.

For more information, please refer to wiki

Usage

  1. To judge certain key if touched

     unsigned char isTouch(int key)		// key- 0~6, if touched return 1
    
  2. Get touch state

    bits 0 to 6 indicate which keys are in detection, if any. Touched keys report as 1, untouched or disabled keys report as 0.

     unsigned char getState();
    
  3. Get Touch Num

     int touchNum();
    

    if no touched, return -1. or will return the touched key number.

  4. Set group for a key

    setGroup(uint8_t key, uint8_t group);
    

    This is used to assign keys to group of which only one can be pressed at a time. Valid group numbers: 0~3, group 255 disables the key.

  5. Query if the touch sensor IC is present

    int chipPresent();

    Returns 1 if the chip ID matches, 0 if not or no reply.


This software is written by Loovee for seeed studio
and is licensed under The MIT License. Check License.txt for more information.

Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.

Analytics