J.Bryan
Posts: 42
Joined: Tue Aug 01, 2017 2:44 pm

Re: Sampling Loop coded in C is inaccurate

Sun Feb 18, 2018 1:04 pm

Heater wrote:
Sun Feb 18, 2018 1:01 pm
J.Bryan,

Excellent. Well done.

As an experiment you could add some code to count loop iterations and check the time. Then you can check that you get as many iterations per minute, hour, day as you expect.

Have some other heavy duty programs running at the same time to see if they affect the results.

No, changing priority with nice will not damage anything. Unless you actually have something else running that also needs the time available.

Also keeping the kernel off of one or more cores won't hurt. Again unless you have other processes that need the time.

Mind you I have no idea what happens when you specify isolcpus=0,1,2,3 :)
Hi heater,

I am also using interrupt from wiring pi library to count ticks. Do you think they will interfere with each other? Thanks for your help :D :D :D :D
Last edited by J.Bryan on Sun Feb 18, 2018 1:07 pm, edited 2 times in total.

Heater
Posts: 8856
Joined: Tue Jul 17, 2012 3:02 pm

Re: Sampling Loop coded in C is inaccurate

Sun Feb 18, 2018 2:13 pm

I think that should work fine.

J.Bryan
Posts: 42
Joined: Tue Aug 01, 2017 2:44 pm

Re: Sampling Loop coded in C is inaccurate

Fri Mar 02, 2018 1:33 am

Hi Heater,

I have added some features to mysampling code and started a new thread as i wanted to do something else. I was just wondering if you have any experience on plotting a "live" graph and be able to assist me on this matter. The thread can be found at viewtopic.php?f=33&t=206799. Thank You.

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 5 guests