Create a LInux Shell Script to read in a GPIO Pin
- or -
Post a project like this£30(approx. $38)
- Posted:
- Proposals: 3
- Remote
- #2249402
- Expired
Description
Experience Level: Entry
Can you do this for me for £30?
I need a loop. It's going to run in Linux.
I want to "read in" the value from an external GPIO Pin
The command to read the value in is;
gpio_utility gpio87
The value can be a logic "1" or a "0"
If it is a logic "1", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
Can you do this for me for £30?
I need a loop. It's going to run in Linux.
I want to "read in" the value from an external GPIO Pin
The command to read the value in is;
gpio_utility gpio87
The value can be a logic "1" or a "0"
If it is a logic "1", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'customer_name=Smith&system_id=JCB123&temperature=22&oil_pressure=49&rough_handling_score=5&customer_notes=servicing'
If it is a logic "0", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'customer_name=Brown&system_id=JCB456&temperature=22&oil_pressure=53&rough_handling_score=8&customer_notes=nothing'
I want to continually keep checking the value of that external GPIO pin
and keep outputting the relevant curl command above
I need a loop. It's going to run in Linux.
I want to "read in" the value from an external GPIO Pin
The command to read the value in is;
gpio_utility gpio87
The value can be a logic "1" or a "0"
If it is a logic "1", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
Can you do this for me for £30?
I need a loop. It's going to run in Linux.
I want to "read in" the value from an external GPIO Pin
The command to read the value in is;
gpio_utility gpio87
The value can be a logic "1" or a "0"
If it is a logic "1", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'customer_name=Smith&system_id=JCB123&temperature=22&oil_pressure=49&rough_handling_score=5&customer_notes=servicing'
If it is a logic "0", I want to write
curl -X POST \
http://192.168.0.20:3000/ \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'customer_name=Brown&system_id=JCB456&temperature=22&oil_pressure=53&rough_handling_score=8&customer_notes=nothing'
I want to continually keep checking the value of that external GPIO pin
and keep outputting the relevant curl command above
Mike M.
100% (34)Projects Completed
28
Freelancers worked with
5
Projects awarded
56%
Last project
31 Aug 2023
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Hi Mike
I suggest as its on Linux you could use a bespoke script scheduled using cron.
Is it possible to get remote access to the system in order to test?
Thanks
750639
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies