TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136557 times)
  2. FAT32 Library (69762 times)
  3. Network Ethernet Library (55856 times)
  4. USB Device Library (46199 times)
  5. Network WiFi Library (41818 times)
  6. FT800 Library (41023 times)
  7. GSM click (28934 times)
  8. PID Library (26386 times)
  9. mikroSDK (26297 times)
  10. microSD click (25307 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

CAP Wheel 2 click

Rating:

5

Author: MIKROE

Last Updated: 2019-07-30

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Capacitive

Downloaded: 2800 times

Not followed.

License: MIT license  

CAP Wheel 2 Click is a capacitive touch sensor with round-shaped electrodes integrated on a Click boardâ„¢. This click can sense touch even through plastic, wood, or other dielectric materials, which can be used to protect the surface of the PCB and the sensor pad trace itself.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "CAP Wheel 2 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "CAP Wheel 2 click" changes.

Do you want to report abuse regarding "CAP Wheel 2 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

CAP Wheel 2 Click

CAP Wheel 2 Click

Native view of the CAP Wheel 2 Click board.

View full image
CAP Wheel 2 Click

CAP Wheel 2 Click

Front and back view of the CAP Wheel 2 Click board.

View full image

Library contains function for waiting RDY(INT) pin Library contains function for getting RDY(INT) pin state Library contains function for I2C read and write with waiting for RDY(INT) pin Library contains function for I2C read and write without waiting for RDY(INT) pin Library contains function for setting basic device configuration

Key functions:

  • uint8_t capwheel2_i2c_write_wait( uint8_t register_address, uint8_t * register_values, uint8_t n_bytes ) - waits for RDY pin to go from HIGH to LOW in order to set register contents.
  • uint8_t capwheel2_i2c_read_wait( uint8_t register_address, uint8_t * read_buffer, uint8_t n_bytes )- waits for RDY pin to go from HIGH to LOW in order to get register contents.
  • uint8_t capwheel2_config(void)- checks device information and sets basic device configuration, thresholds and sensitivity values.

Examples description

The application is composed of three sections :

  • System Initialization - systemInit( ) - Initializes I2C, LOG and INT pin
  • Application Initialization - applicationInit( ) - Initializes I2C driver and CAP Wheel 2 device
  • Application Task - applicationTask( ) - Executes one of three 'capwheel2_get_xxx_task( )' functions

Additional Functions :

  • capwheel2_error( ) - Logs error message and blocks code execution in endless while loop
  • capwheel2_get_channels_task( ) - Logs active channels in touch and halt bytes ( channels: CH0 - proximity channel, CH1, CH2, CH3 )
  • capwheel2_get_gesture_task( ) - Logs active gestures ( gestures: tap, touch, proximity )
  • capwheel2_get_channel_counts_task( ) - Logs channel count values for each channel
  • capwheel2_get_channels_touch( ) - Logs touch byte active channels ( exectuted by 'capwheel2_get_channels_task( )' function )
  • capwheel2_get_channels_halt( ) - Logs halt byte active channels ( exectuted by 'capwheel2_get_channels_task( )' function )
  • capwheel2_error( ) - Logs error message and blocks code execution in endless while loop
  • capwheel2_get_channels_task( ) - Logs active channels in touch and halt bytes ( channels: CH0 - proximity channel, CH1, CH2, CH3 )
  • capwheel2_get_gesture_task( ) - Logs active gestures ( gestures: tap, touch, proximity )
  • capwheel2_get_channel_counts_task( ) - Logs channel count values for each channel
  • capwheel2_get_channels_touch( ) - Logs touch byte active channels ( exectuted by 'capwheel2_get_channels_task( )' function )
  • capwheel2_get_channels_halt( ) - Logs halt byte active channels ( exectuted by 'capwheel2_get_channels_task( )' function )
void applicationTask( )
{
    capwheel2_get_channels_task( );
}

The full application code, and ready to use projects can be found on our LibStock page.

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

TouchKey 2 click

1

TouchKey 2 click has four capacitive pads powered by ATtiny817 which has an integrated touch QTouch® controller. The click is designed to run on a 3.3V power supply. The four LEDs onboard the click indicate the Key (Pad) is pressed. TouchKey 2 click communicates with the target microcontroller over UART and SPI interface.

[Learn More]

Buck n Boost click

0

Buck & Boost Click is a compact add-on board that contains a configurable power management device. This board features the MIC7401, a highly-integrated power-management IC featuring five synchronous buck regulators, one boost regulator, and a high-speed I2C interface with an internal EEPROM memory from Microchip.

[Learn More]

Charger 17 click

0

Charger 17 Click is a compact add-on board that provides a single-cell battery charging solution. This board features the RT9471, a 3A single-cell switching battery charger from Richtek. It is a highly-integrated battery charge and system power-path management device for single-cell Li-Ion and Li-Polymer batteries. The high-efficiency 1.5MHz synchronous switch-mode buck charger achieves up to 92% charge efficiency at 2A with 5V input and 3.8V battery.

[Learn More]