Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Sorry I forgot to mention, but I do use external 10k pull-up resistor and it seems to work fine with it.
  2. Thank you for the help @Mention ! I didn't use INPUT_PULLUP but instead just pinMode(UP, INPUT), becaus ethe Energia documentation says I should use just INPUT if it is for external push button, not the on board one. Yes true, I don't use the flag to do anything useful, I just realized that. So basically if I leave my ISRs as they are, I won't really have code in the loop routine? Apart from printing on the serial monitor. I will try that next. I'm not completely sure how to do the debouncing. Because I don't read switch state anywhere else in the code, just in attachInterrupt. Should I r
  3. Hi all, I'm relatively new to microcontroller programming and I'm having a few problems with a current project that I would appreciate help with. I'm using MSP430G2553 and Energia to control the speed of two vibromotors. To this I use three pushbuttons, one to change from one motor to another and two more(up and down) to increase/decrease the speed. I have 3 interrupts to do all this and I copied the code below. The program works mostly but sometimes it acts randomly, for example, increasing the speed when I press the decrease button, or not responding at all. My questions are these, they
  • Create New...