Topics

Accessing the iPhone 5 Connector Port from BBC BASIC

John Alfred
 

Is it possible to access the connector pins using BBC BASIC, please ?

Richard Russell
 

> Is it possible to access the connector pins using BBC BASIC, please ?

You are referring to the Lightning port, I presume?  What are you planning to connect to it?  For example it's quite possible that if it's an external game pad, joystick, keyboard or mouse (or something that emulates one of those) you might be able to access it from BBC BASIC.  The question is similar to asking whether it's possible to access a USB port from BB4W, it depends entirely on the external device that you are hoping to interface with.

John Alfred
 

I'd like to design my own hardware to work off it. e.g. read a switch, turn on a LED, read an Analog to Digital converter, Send a number to a Digital to Analog converter.

I used to use PEEK and POKE back in the days of the Commodore PET to turn on/off individual bits



From: Richard Russell <news@...>
To: bb4w@groups.io
Sent: Tuesday, 8 January 2019, 21:19
Subject: Re: [bb4w] Accessing the iPhone 5 Connector Port from BBC BASIC

> Is it possible to access the connector pins using BBC BASIC, please ?

You are referring to the Lightning port, I presume?  What are you planning to connect to it?  For example it's quite possible that if it's an external game pad, joystick, keyboard or mouse (or something that emulates one of those) you might be able to access it from BBC BASIC.  The question is similar to asking whether it's possible to access a USB port from BB4W, it depends entirely on the external device that you are hoping to interface with.


Richard Russell
 

On Tue, Jan 8, 2019 at 10:45 PM, John Alfred wrote:
I'd like to design my own hardware to work off it. e.g. read a switch, turn on a LED, read an Analog to Digital converter, Send a number to a Digital to Analog converter.
Are you sure such a thing exists?  A quick Google search for 'Lightning GPIO' didn't turn up anything promising.  If you've already identified a suitable interface please post a URL.

Why are you contemplating using an expensive phone for such a project when something like a Raspberry Pi would do it for a fraction of the price?

John Alfred
 

It's just to play with for the moment. It's basically a simple Data Acquisition System.

If it's to have any commercial merit later, more people have an iPhone than a Raspberry Pi.

I haven't looked at the pins available on the iPhone to know if it's feasible or not, but I assume it is.

If a PC can link to the phone via a USB socket, then it must be possible.



From: Richard Russell <news@...>
To: bb4w@groups.io
Sent: Tuesday, 8 January 2019, 23:26
Subject: Re: [bb4w] Accessing the iPhone 5 Connector Port from BBC BASIC

On Tue, Jan 8, 2019 at 10:45 PM, John Alfred wrote:
I'd like to design my own hardware to work off it. e.g. read a switch, turn on a LED, read an Analog to Digital converter, Send a number to a Digital to Analog converter.
Are you sure such a thing exists?  A quick Google search for 'Lightning GPIO' didn't turn up anything promising.  If you've already identified a suitable interface please post a URL.

Why are you contemplating using an expensive phone for such a project when something like a Raspberry Pi would do it for a fraction of the price?


Richard Russell
 

On Wed, Jan 9, 2019 at 12:13 AM, John Alfred wrote:
If it's to have any commercial merit later, more people have an iPhone than a Raspberry Pi.
And many more have an Android device than an iPhone!  I bet there's a much greater availability of suitable interfaces for Android than for iOS.    Anyway an entire Raspberry Pi Zero (admittedly you can't run BBC BASIC on that) would probably be cheaper than the external hardware interface that would in any case be required to connect to the phone!

I haven't looked at the pins available on the iPhone to know if it's feasible or not, but I assume it is.
It's not really a case of "pins" - presumably you're not going to be building your own hardware and writing drivers! - but the availability of a suitable existing interface.  There are of course USB boards like the Velleman K8055, which has been much discussed here as a GPIO interface for BB4W, but whilst that would interface electrically are there any iOS drivers for it?  A Google search finds references to there once having been an iOS app which would communicate with the K8055 but even that seems not to exist any more (I wouldn't be surprised if Apple disapproved).

So if you haven't already identified something suitable I suspect your idea is dead in the water.  I did wonder whether it might be more fruitful to consider a Bluetooth wireless interface rather than Lightning; I've not checked whether anything like that is available.

John Alfred
 

mmmh.... it might make more sense, as you say, to look at an Android phone first. Fewer barriers, technical and legal, to getting something working.

I acquired an old Samsung lately to play with. (Android 4.4.2)

In the late '80's I was involved with an ATE project working from the PC. Serial-to-Parallel and Parallel-to-serial communication techniques were implemented via a Digital I/O card plugged into the PC. Lots of PEEKING/POKING involved, and the Language used was BASIC !



From: Richard Russell <news@...>
To: bb4w@groups.io
Sent: Wednesday, 9 January 2019, 9:36
Subject: Re: [bb4w] Accessing the iPhone 5 Connector Port from BBC BASIC

On Wed, Jan 9, 2019 at 12:13 AM, John Alfred wrote:
If it's to have any commercial merit later, more people have an iPhone than a Raspberry Pi.
And many more have an Android device than an iPhone!  I bet there's a much greater availability of suitable interfaces for Android than for iOS.    Anyway an entire Raspberry Pi Zero (admittedly you can't run BBC BASIC on that) would probably be cheaper than the external hardware interface that would in any case be required to connect to the phone!

I haven't looked at the pins available on the iPhone to know if it's feasible or not, but I assume it is.
It's not really a case of "pins" - presumably you're not going to be building your own hardware and writing drivers! - but the availability of a suitable existing interface.  There are of course USB boards like the Velleman K8055, which has been much discussed here as a GPIO interface for BB4W, but whilst that would interface electrically are there any iOS drivers for it?  A Google search finds references to there once having been an iOS app which would communicate with the K8055 but even that seems not to exist any more (I wouldn't be surprised if Apple disapproved).

So if you haven't already identified something suitable I suspect your idea is dead in the water.  I did wonder whether it might be more fruitful to consider a Bluetooth wireless interface rather than Lightning; I've not checked whether anything like that is available.