News for hackers. Stuff that matters.

Ask HN: Is it possible to make a DIY watering system using an old iPad? How?

I have an old iPad (iOS 12.5.5) which I don't use for any purpose currently due to slight screen issues. I was wondering if I could repurpose it into a control hub for some sort of watering system which I could use, possibly with even remote control support - basically replacing the Arduino/R Pi component in most DIY kits. Would this be an idea that's possible without significant effort?
( 8 comments | 2 points | on HN )
Re:Ask HN: Is it possible to make a DIY watering system usin... by tgflynn on Sunday June 26, 2022 @01:48PM (#31886106)
It probably wouldn't be too hard to write an iOS program to send commands via USB or WiFi, but you need to control water valves and I'm not sure if you'll find any/many with USB interfaces. If not you would need to build some circuitry to convert USB signals to whatever kind of control signals your valves need.

It could be a fun project, but I wouldn't call it "without significant effort".

Re:Ask HN: Is it possible to make a DIY watering system usin... by fakedang on Sunday June 26, 2022 @01:57PM (#31886199)
By IOS program, do you mean some app-like interface? Or is there a way to run something like Python or C++ code as there is in Android?
Re:Ask HN: Is it possible to make a DIY watering system usin... by tgflynn on Sunday June 26, 2022 @02:06PM (#31886300)
What I meant was a program written in one of the languages Apple supports for iOS development. I'm no iOS expert and it's been years since I've developed an app for it so I'm not sure exactly what is available these days.

For me the electronics would be a larger consideration than the software, but then I have a lot more experience developing software than I do building circuits.

EDIT: I missed that you mentioned C++. The app I wrote for iOS did use some C++ code but it was still necessary to have code in Objective-C/C++ to provide a UI and interact with the OS.

As for Python a quick google search turned up a couple of possibilities which are linked from this page:

https://www.python.org/download/other/

Re:Ask HN: Is it possible to make a DIY watering system usin... by daviddever23box on Sunday June 26, 2022 @01:17PM (#31885802)
You'd be better off with an older Raspberry Pi, using the iPad solely as a browser.
Re:Ask HN: Is it possible to make a DIY watering system usin... by fakedang on Sunday June 26, 2022 @01:55PM (#31886185)
This increasingly seems to be the case. The thing is, I already have made a DIY system with an R Pi, and I've used Android to run Python code, so I thought I would be able to skip the RPi and do without it.
Re:Ask HN: Is it possible to make a DIY watering system usin... by Hani1337 on Sunday June 26, 2022 @02:02PM (#31886260)
Maybe install Android on the tablet?
Re:Ask HN: Is it possible to make a DIY watering system usin... by PaulHoule on Sunday June 26, 2022 @01:20PM (#31885824)
Like watering your lawn, your garden?
Re:Ask HN: Is it possible to make a DIY watering system usin... by fakedang on Sunday June 26, 2022 @01:51PM (#31886142)
A small apartment garden, in a balcony maybe 50 Sq ft.