Hi. i have some problem when using two interrupts on mega 2560 board. i use two hall effect sensor, one for water flow and other for rpm on a turbine. there are no output display on the serial monitor. i never use interrupts before and this is the first time.
here the code that i try to write. can anyone show me the correct way to write the code??
Check your wiring. Which Arduino pins are the Hall sensors connected to and do you have resistors on them to pull their voltage high or low ?
Incidentally, the result of this calculation Calc = (hallone * 60 / 7.5);will be an integer despite the division by 7.5 because Calc is defined as an int.
Do the interrupt pins get pulled low by the Hall sensors when they are activated ? In other words are the Hall sensors wired from the interrupt pins to ground ?
Sorry for the late reply. Thanks for both reply. well, i just been school on interrupt on the other forum. it is my mistake to put interrupt() and nointerrupt(). i just have to put interrupt() on setup and it work. thanks for the reply.