I have made some good progress with my ISR and am serial printing the count on the serial monitor, now what I want to achieve is to call the count to be displayed on my 3 digit seven seg cc display or rather let the ISR trigger the counts whenever the sensors flag depending on their sequence. I have the code to count from 0-999 back to 0 so my problem is how to combine with the ISR. Any help is much appreciated. Much thanks.
STEVE10K
Posts
-
C CODE FOR RUNNING TWO SENSORS FOR BI-DIRECTIONAL COUNTING -
C CODE FOR RUNNING TWO SENSORS FOR BI-DIRECTIONAL COUNTINGHi Tr@V, This is great mate and I appreciate your help so much. I am thinking of going for either ARDUINO MEGA/ARDUINO 2560 which have ATMEL 1280 and ATMEL 2560 chips respecetively.I will probably have to connect a bluetooth or wifi shield and a SD card for storing.Am not much aware of Freescale Kinetis family of MPU's you suggested but will check them out. Any chance I can get your email address or phone number incase i hit hard rocks?I may need your help.I'll also let you know how far have gone. Thanks.
-
C CODE FOR RUNNING TWO SENSORS FOR BI-DIRECTIONAL COUNTINGI am tieing a pair of infrared sensors S1 and S2 onto GPIO lines(digital I/O) of any microcontroller that is easy to program in C as I am new to this.I am looking into ARDUINO UNO(ATmega328 MCU),ARDUINO MEGA(ATmega1280) or a PIC16F877A.I will use the Microcontroller to read the interrupts from the sensors as they change on being broken in the sequence mentioned before. My main problem is the real coding in C of the logic onto my app. Can you help with the code?? I wish to have the following functionality: 1) Read interrupts from sensors 2)Increment or decrement counter depending on sequence they are broken 3) timestamp the count and enable storing 4) Pass timestapmed data onto a remote host computer via bluetooth or Wifi. Do you suggest any parcticular Microcontroller for this application? Thank you very much.
-
C CODE FOR RUNNING TWO SENSORS FOR BI-DIRECTIONAL COUNTINGI AM A LITTLE BIT EXPERIENCED WITH C PROGRAMMING AND PICS BUT AM WONDERING IF ANYONE OUT THERE CAN HELP WITH THE CODE TO RUN A PIC16F8777A OR AN ARDUINO WITH TWO IR SENSORS S1 AND S2 TO PERFORM BIDIRECTIONAL COUNTING IN AND OUT. IN THE FIRST SEQUENCE BREAKING FIRST S1 AND THEN S2 WILL TELL THE MICROCONTROLLER TO INCREMENT THE COUNTER WHILE BREAKING THE SECOND SEQUENCE, FIRST S2 AND THEN S1 WOULD TELL THE MICROCONTROLLER TO DECREMENT THE COUNTER.THE MICROONTROLLER SHOULD ALSO STORE AND TIMESTAMP THE COUNTS AND BE ABLE TO PASS THE TIMESTAMPED DATA TO A REMOTE COMPUTER VIA BLUETOOTH OR WIFI. ANY HELP WILL BE GREATLY APPRECIATED. THANK YOU.