Forums
New posts
Forum list
Search forums
What's new
New posts
New resources
Latest activity
Trending Threads
Resources
Latest reviews
Search resources
FarmTV
Farm Compare
Search
Tokens/Searches
Calendar
Upcoming Events
Members
Registered members
Current visitors
New Resources
New posts
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Forum list
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Extras
Computers & IT
Farm Technology Projects
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="rollestonpark" data-source="post: 5828806" data-attributes="member: 76444"><p>I've had no training in computers or coding.</p><p>Whilst my coding might not be perfect, it works.</p><p>But a bit of googling and some good books, and you can soon come up with something.</p><p></p><p>Anyone who can handle a computer reasonably well should have a go if they need to control something.</p><p></p><p>Just as an example with a Raspberry Pi with a resistor and an LED stuck on it and the few lines of code below:</p><p>[CODE]</p><p>import RPi.GPIO as GPIO</p><p>import time</p><p>GPIO.setmode(GPIO.BCM)</p><p>GPIO.setwarnings(False)</p><p>GPIO.setup(18,GPIO.OUT)</p><p>print("LED on")</p><p>GPIO.output(18,GPIO.HIGH)</p><p>time.sleep(1)</p><p>print("LED off")</p><p>GPIO.output(18,GPIO.LOW)</p><p>[/CODE]</p><p></p><p>Just these lines will turn on the LED for 1 sec and off again.</p><p></p><p>Now, do what farmers do best, think BIG:</p><p></p><p>If I can turn on an LED bulb, then I can power up a coil in a relay using the EXACT same code and almost exactly the same circuit.</p><p>The relay could then control a contactor, now we're talking, so now I can turn on my 3 phase motor.</p><p></p><p>So wire in a temperature sensor to the Pi and we can turn on/off the 3 phase motor according to a temperature reading from somewhere.</p><p>Or use the time of day, or day of the week or a combination etc etc.</p><p></p><p>The Pi can also sense when a switch is pressed. Using just a few lines of code (bit like the above).</p><p>Based on this info you could code for the 3 phase motor to turn on or off etc.</p><p>So in my case if the CHP/boiler goes offline a relay is triggered (our switch), then fans can be switched off, because there will be no heat.</p><p>You could add a delay in there etc if you wanted and so forth.</p><p>So the Pi can sense all kinds of things and react accordingly.</p><p></p><p>So to take this another stage further, you can write the code above into a web page, maybe just another half dozen lines or so.</p><p>The webpage is on the Pi, so we use our phone to go to the newly made page and press a button and our LED light comes on.</p><p>But we're using a relay wired to whatever, maybe a boiler or a fan heater or anything you like. The webpage controls that instead.</p><p></p><p>So a Pi might cost about £50 to get running, but after that, you just code it to do what you want.</p><p>Just start small, a few lines and test it, add a little bit of extra functionally slowly and test etc.</p><p>You eventually get there.</p></blockquote><p></p>
[QUOTE="rollestonpark, post: 5828806, member: 76444"] I've had no training in computers or coding. Whilst my coding might not be perfect, it works. But a bit of googling and some good books, and you can soon come up with something. Anyone who can handle a computer reasonably well should have a go if they need to control something. Just as an example with a Raspberry Pi with a resistor and an LED stuck on it and the few lines of code below: [CODE] import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18,GPIO.OUT) print("LED on") GPIO.output(18,GPIO.HIGH) time.sleep(1) print("LED off") GPIO.output(18,GPIO.LOW) [/CODE] Just these lines will turn on the LED for 1 sec and off again. Now, do what farmers do best, think BIG: If I can turn on an LED bulb, then I can power up a coil in a relay using the EXACT same code and almost exactly the same circuit. The relay could then control a contactor, now we're talking, so now I can turn on my 3 phase motor. So wire in a temperature sensor to the Pi and we can turn on/off the 3 phase motor according to a temperature reading from somewhere. Or use the time of day, or day of the week or a combination etc etc. The Pi can also sense when a switch is pressed. Using just a few lines of code (bit like the above). Based on this info you could code for the 3 phase motor to turn on or off etc. So in my case if the CHP/boiler goes offline a relay is triggered (our switch), then fans can be switched off, because there will be no heat. You could add a delay in there etc if you wanted and so forth. So the Pi can sense all kinds of things and react accordingly. So to take this another stage further, you can write the code above into a web page, maybe just another half dozen lines or so. The webpage is on the Pi, so we use our phone to go to the newly made page and press a button and our LED light comes on. But we're using a relay wired to whatever, maybe a boiler or a fan heater or anything you like. The webpage controls that instead. So a Pi might cost about £50 to get running, but after that, you just code it to do what you want. Just start small, a few lines and test it, add a little bit of extra functionally slowly and test etc. You eventually get there. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Extras
Computers & IT
Farm Technology Projects
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top