This has been a frustrating few days.
I've been building a power feed for my new mill (there's another post somewhere) and, to my surprise, the hardware and electronics have been going pretty well. I'm just applying the final coat of paint (to the metalwork).
The software not so much. Which is embarrassing as I have very limited metal working skills, but over 40 years of development experience.
I finally worked out how to get the arduino part driving the motors (help from several members here), but the part that's frustrated me is the user interface. Being a digital person, I wanted to drive it from a touch screen (slide left for faster left and so on + have some present movements).
My original idea was to use one of the various small tablets I've got as the UI. This largely failed because the tablets (early Nexus 7) don't support 'OTG' for hardware reasons. At least I think so. Opinion is not always clear on the web.
I carried on looking at this approach and tried my newer (58 quid) tablet from bangood. This does support OTG and I can drive the Arduino from it with a PlayStore serial terminal.
now to write a program. In c#, please my Java is rusty and I never learnt raw android dev (iOS, yes and Windows Phone yes, not not Android).
Now it turns out that there is limited support for USB serial on android with c#, but some nice man has ported a java library and I could run his sample program on my tablet and control the arduino with simple commands.
However, he'd written the android part in android language and not in the 'cross platform' mode which I understand. I have no desire to learn yet another coding environment. In truth, I'm having enough trouble remembering the ones I've already used. And of course I don't want to use my cheap tablet for this. As well as the expense to buy a replacement, it's really too big – I want something more phone sized!
Aha! I remembered my old windows 8 phone (Lumia 735)! Perfect size and I've written programs for it…
Hunted for it for a while and, unexpectedly, found it in one of the 4 places I thought it might be (last of the 4, naturally). Charged it up and went about doing some background research.
Oh, dear, that one won't support OTG (serial USB) either… But a Lumia 950 will which I can buy for 30 quid from eBay. Cheaper than a new tablet, I suppose.
OH. In the meantime, I'd already looked at using a Raspberry PI, but my Pis are first edition and don't play well with LCD displays unless I get one from China which takes ages and who knows if it will work or pay quite a bit more here – much the same learning curve exists there, of course, though it would be cheaper.
So I went to bed despondent, worrying how to make this work (on the cheap).
Zing! I had an idea! I could swap the USB lead for Bluetooth. Which the windows phone will support and I seemed to think I could get for Arduino. Popped downstairs to find Amazon and Google are my friends. I ordered an d8 quid UK based HC-05 for the Arduino as I'm fed up waiting rather than a 2 quid version from China (I know. A bit hypocritical) and feel I might have a way forward.
Until the next obstacle.
Phew!
Iain