Jump to content

Search the Community

Showing results for tags 'CapTouch'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 4 results

  1. Guys, I am having some problems with the CapTouch library and need some help from the experts to resolve this. I modified (stripped) the CapTouch button example an uploaded that code to a G2553: #include <CapTouch.h> #define LEFT_BUTTON 10 #define MIDDLE_LED P1_6 uint8_t state = false; CapTouch left = CapTouch(LEFT_BUTTON, TOUCH_BUTTON); void setup() { /* Use the middle LED to indicate touch */ pinMode(MIDDLE_LED, OUTPUT); } void loop() { /* State will be 1 if any of the buttons was touched, otherwise 0 */ state = left.isTouched(); /* Turn on the LED if any of the buttons was touched */ digitalWrite(MIDDLE_LED, state); } This code runs fine for over 20 hours but then stalls. The the green led (as defined in the code) is constantly on and the board no longer responses. Any clues to what might cause this behaviour?
  2. Hi, I am working on a wireless touch controller for 433Mhz dimmer modules. The idea is simple. When a touch button is touched a 433Mhz command is send to a wireless dimmer module. A single or double tap switches the module on or off, holding it will cycle it from dim-bright-dim until the button is released. For this I am using the CapTouch library posted in library section of this forum. I have create a class for this to enable me to quickly add more sensors. However when I initialise more than one class the code doesn't work anymore. And I can't figure out why. The code still compiles but a touch is registered constantly. (all lights are on) Can anyone look in my code and give me some pointers? #include <RemoteTransmitter.h> #include <CapTouch.h> //KaKuTransmitter kaKuTransmitter(11); #ifndef touchDimmer_h #define touchDimmer_h class touchDimmer { public: touchDimmer(char housecode, byte unit_number, byte pin); void begin(); void check(); private: long _lTimeHigh; long _lHighTimer; long _lLowTimer; long _lTimeLow; long _lTimer; int _iPulse; int _iNumReadings; int _iReadings[10]; // the readings from the analog input int _iIndex; // the index of the current reading int _iTotal; // the running total float _average; // the average boolean _bCurState; boolean _bPrevState; boolean _bDimmerMode; boolean _bButtonState; int _iHighPulse; // Time in millis that is nessesary to count as high int _iLowPulse; // Time in millis that is nessesary to count as low byte _housecode; byte _unit_number; byte _pin; // protected: CapTouch* button; }; #endif touchDimmer::touchDimmer(char housecode, byte unit_number, byte pin) { _housecode = housecode; _unit_number = unit_number; _pin = pin; button = new CapTouch(_pin,TOUCH_BUTTON); } void touchDimmer::begin() { _lTimeHigh = 0; _lHighTimer = 0; _lLowTimer = 0; _lTimeLow = 0; _lTimer = 0; _iPulse = 0; _iNumReadings = 10; _iReadings[_iNumReadings]; _iIndex = 0; _iTotal = 0; _average = 0; _bCurState = false; _bPrevState = false; _bDimmerMode = false; _bButtonState = false; _iHighPulse = 20; _iLowPulse = 20; for (int thisReading = 0; thisReading < _iNumReadings; thisReading++) { _iReadings[thisReading] = 0; } }; void touchDimmer::check() { _lTimer = millis(); _iTotal= _iTotal - _iReadings[_iIndex]; _iReadings[_iIndex] = button->isTouched(); _iTotal= _iTotal + _iReadings[_iIndex]; _iIndex = _iIndex + 1; if (_iIndex >= _iNumReadings) _iIndex = 0; _average = _iTotal / _iNumReadings; if(_iTotal == _iNumReadings) { _bCurState = HIGH; if(_bCurState != _bPrevState) { _lTimeHigh = _lTimer; digitalWrite(RED_LED,HIGH); if((_lHighTimer % _iHighPulse) == 0) { if(_bCurState != _bPrevState) { _iPulse++; _bPrevState = _bCurState; digitalWrite(RED_LED,HIGH); } } } _lHighTimer = _lTimer - _lTimeHigh; if((_lHighTimer > 100)) { if(_bDimmerMode == LOW) { Serial.println("Dimmer ON"); _bDimmerMode = HIGH; _iPulse = 0; digitalWrite(GREEN_LED, HIGH); // kaKuTransmitter.sendSignal(_housecode, _unit_number, true); } } } if(_iTotal == 0) { _bCurState = LOW; _lTimeLow = _lTimer; _lLowTimer = _lTimer - _lTimeLow; if (_bDimmerMode == HIGH) { _bDimmerMode = LOW; digitalWrite(GREEN_LED, LOW); // kaKuTransmitter.sendSignal(_housecode, _unit_number, true); } if (((_lTimer - _lTimeHigh) > 300) && (_iPulse > 0)){ switch(_iPulse){ case 1: // kaKuTransmitter.sendSignal(_housecode, _unit_number, true); break; case 2: // kaKuTransmitter.sendSignal(_housecode, _unit_number, false); break; } _iPulse = 0; } if((_lLowTimer % _iLowPulse) == 0) { if(_bCurState != _bPrevState) { _bPrevState = _bCurState; digitalWrite(RED_LED,LOW); // Light the led } } } } touchDimmer test = touchDimmer('N',15,10); touchDimmer test2 = touchDimmer('N',15,5); void setup() { pinMode(RED_LED, OUTPUT); pinMode(GREEN_LED, OUTPUT); digitalWrite(GREEN_LED, LOW); digitalWrite(RED_LED, LOW); test.begin(); test2.begin(); } void loop() { test.check(); test2.check(); }
  3. I'm relatively new to msp430 dev. I'm on Linux and intend to use mspgcc as my compiler. I see the demo code for the cap touch booster pack has a directory for CCS and IAR, but no makefile or anything for gcc. I found a generic msp430 makefile and added all the source files from the demo to it. I'm using the msp430g2152 and have updated all references accordingly. I'm still getting a bunch of errors like CapTouchBoosterPack_UserExperience.c|172| relocation truncated to fit: R_MSP430_16 against symbol `TimerA_UART_tx' defined in .text section in uart.o CapTouchBoosterPack_UserExperience.c|173| relocation truncated to fit: R_MSP430_16 against symbol `TimerA_UART_shutdown' defined in .text section in uart.o || CapTouchBoosterPack_UserExperience.o: In function `CapTouchIdleMode': CapTouchBoosterPack_UserExperience.c|205| relocation truncated to fit: R_MSP430_16_BYTE against symbol `proximity_sensor' defined in .rodata section in CapacitiveTouchLibrary/structure.o CapTouchBoosterPack_UserExperience.c|205| relocation truncated to fit: R_MSP430_16 against symbol `TI_CAPT_Custom' defined in .text section in CapacitiveTouchLibrary/CTS_Layer.o || CapTouchBoosterPack_UserExperience.o: In function `MeasureCapBaseLine': CapTouchBoosterPack_UserExperience.c|225| relocation truncated to fit: R_MSP430_16_BYTE against symbol `wheel' defined in .rodata section in CapacitiveTouchLibrary/structure.o CapTouchBoosterPack_UserExperience.c|225| relocation truncated to fit: R_MSP430_16 against symbol `TI_CAPT_Init_Baseline' defined in .text section in CapacitiveTouchLibrary/CTS_Layer.o CapTouchBoosterPack_UserExperience.c|226| relocation truncated to fit: R_MSP430_16_BYTE against symbol `wheel' defined in .rodata section in CapacitiveTouchLibrary/structure.o CapTouchBoosterPack_UserExperience.c|226| relocation truncated to fit: R_MSP430_16 against symbol `TI_CAPT_Update_Baseline' defined in .text section in CapacitiveTouchLibrary/CTS_Layer.o CapTouchBoosterPack_UserExperience.c|227| relocation truncated to fit: R_MSP430_16_BYTE against symbol `middle_button' defined in .rodata section in CapacitiveTouchLibrary/structure.o CapTouchBoosterPack_UserExperience.c|227| additional relocation overflows omitted from the output Has anyone managed to compile this demo with mspgcc? Alternatively, does anyone have an alternative demo using the captouch booster pack that does work with mspgcc? I've searched through the forums a bit, but did not notice anything matching the above. Thanks!
  4. I'm on osx with energia, and I just got my 430BOOST-SENSE1 cap touch board. 1) What does it take to start programming it with energia? (How does one add the libraries & examples from slac489 or slac490) 2) I got the demo working with the M430G2452 IC that came with the board, but eager to try energia I uploaded the blink example to the IC. While the middle LED blinks now, where/how can I get back the original demo to the chip when needed? 3) As a newbie hobbyist, should I be using something other then energia? Thanks in advance, I look forward to learning and experimenting!
×