Reading Digital caliper with Arduino
The code that I sent had the original values for the timing defines. I think you had to change them to get things to work based on what you saw on the scope. Hopefully you can change them to the values you originally had when it was at least 'interrupting'.
Reply
Thanks given by:
(03-28-2015, 11:35 AM)arvidj Wrote: The code that I sent had the original values for the timing defines. I think you had to change them to get things to work based on what you saw on the scope. Hopefully you can change them to the values you originally had when it was at least 'interrupting'.

I did change them but that was before I discovered the interrupts weren't running. I reloaded a fresh copy of your code and fixed the interrupts but I don't think I changed the timing values. I'll check and change them if necessary and try again.

Ed
Reply
Thanks given by:
I changed the values as shown below and still no data displayed.

#define CLOCK_NOISE_FILTER 10                  // How many microseconds long must the clock be stable for it to be consider 'good'
#define MINIMUM_BURST_START_PULSE_WIDTH 80000   // At a minimum, how many microseconds long is the pulse at the beginning of a burst
#define MAXIMUM_TIME_FOR_A_SINGLE_BURST 10000   // The maximum amount of time that a burst should take before considered invalid

Lunch time. Smile

Ed
Reply
Thanks given by:
I have copied the code in post 99 and pasted it into an Arduino IDE window. I get a compile error.
I know this should be obvious to me by now, but it's not. I am using version 1.0.6 of the IDE because I don't like some of the features in the newest version.
I have a screen shot of the error message and the text file, but don't see a way of attaching them.

Chuck
Micromark 7x14 Lathe, X2 Mill , old Green 4x6 bandsaw
The difficult takes me a while, the impossible takes a little longer.
Reply
Thanks given by:
(03-28-2015, 12:35 PM)chucketn Wrote: I have copied the code in post 99 and pasted it into an Arduino IDE window. I get a compile error.
I know this should be obvious to me by now, but it's not. I am using version 1.0.6 of the IDE because I don't like some of the features in the newest version.
I have a screen shot of the error message and the text file, but don't see a way of attaching them.

Chuck

Chuck,

Here's a tutorial on attaching pictures. It works the same whether it's a picture or a text file since they are both just file attachments to posts.

http://www.metalworkingfun.com/showthread.php?tid=1006

Ed
Reply
Thanks given by:
Thanks, Ed. Figured out that I had to uncheck the quick reply option. Make that use 'New Reply'...

Attached the screenshot and error text.

Chuck


Attached Files Thumbnail(s)
   

.txt   compile error.txt (Size: 1.04 KB / Downloads: 3)
Micromark 7x14 Lathe, X2 Mill , old Green 4x6 bandsaw
The difficult takes me a while, the impossible takes a little longer.
Reply
Thanks given by:
(03-28-2015, 01:06 PM)chucketn Wrote: Thanks, Ed. Figured out that I had to uncheck the quick reply option. Make that use 'New Reply'...

Attached the screenshot and error text.

Chuck

Chuck,

Please copy and paste your entire code into a post. Those errors should be easy to fix once I can see all of the code.

Ed
Reply
Thanks given by:
Fixed the error Ed. Added the #include <util/atomic.h> as per your PM.

Chuck
Micromark 7x14 Lathe, X2 Mill , old Green 4x6 bandsaw
The difficult takes me a while, the impossible takes a little longer.
Reply
Thanks given by:
Got it working. The fix for the shift register not working was this:

inProcessBurstData << 1;

Needed to be changed to this:

inProcessBurstData = inProcessBurstData << 1;

That didn't fix the display issues. There were a number of things I had to change to make it display the data. Only thing left to do is to format the data prior to dumping it to the serial monitor.

Ed
Reply
Thanks given by:
All I get is Ready: on serial monitor after that change.

Chuck
Micromark 7x14 Lathe, X2 Mill , old Green 4x6 bandsaw
The difficult takes me a while, the impossible takes a little longer.
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)