Jump to content
43oh

Tip to repeat command on terminal


Recommended Posts

I was debugging the ADC on the beaglebone( B) and wanted ADC data on AIN5 to be streamed out. Found a good tip on stack overflow to repeat data every n(millisecond) using sleep( other than watch). Watch clears the screen every interval and does not allow fractional time.

Below command will dump ADC data every 1/2 a second.

while true; do cat /sys/devices/ocp.3/helper.15/AIN5; sleep .5; done
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...