Android tablet as a Particle Photon display (with direct connection)?


#1

Hi guys,

I wanted to know if anyone had experimented with an Android tablet like this one connected directly to a Photon.
I would like the tablet to be connected directly (wired) to my photon by using SPI or I2C ports (or serial?)
image

I know about these displays already:
The nextion displays
the 4D displays
But they run their own software and not Android.

What am I after?
What if I’m already developing an Android app that I could reuse in a “local” tablet instead of writing a new GUI on a nextion or 4d display? That would be really cool!
Yes, I understand that my app on my phone will be hitting the Particle Cloud API to interact with the Photon, while the local tablet will need to use a wired connection (like I2C, SPI or serial).

EDIT:
Wanted position
Develop the same app, same look and feel, for a tablet that will boot into kiosk mode into my app, and for the users tablet/phone.

Advantages

  • no need for the user to do the initial configuration of wifi on the photon nor the tablet, they already talk to each other
  • I can use the same app for the system on the users phone/tablet, and on the display that comes with the system.
  • Same look and feel, less development time since same code (almost the same code, one app will use cloud connection, the other will use serial/local)
  • no other software to learn (the display editor software)

So, any ideas around?

If you have the slightest clue about a tablet already sold for this purpose, please let me know in the comments below.

EDIT: @RWB would you have any opinion on this?

Thanks!
Gustavo.


#2

Not an answer, but rather a question:
What’s the benefit of connecting directly to the device rather than over the network? If you want to keep communication local, there are other protocols available for that (tcp/udp), that might be easier all together than dealing with the hardware and software implications of connecting with an android device.

Seeing as you’ve probably thought of that already, I’d be interested to know why a hardwired connection has the preference here.


#3

Looks interesting, what do they cost?
The pic states I2C but I can’t find any further reference here


#4

The specs are so vague I can’t tell if it will work or not, but another option if the tablet supports USB OTG on the USB port, you can connect the tablet and the Photon by a USB OTG cable. That will present as a serial port to Android and has the added benefit of doing power and data over a single cable to the Photon.


#5

Imagine your system doesn’t have access to wifi. Image the tablet boots in a kiosk mode and it only shows only your app. Imagine you are already developing an app.
Here are some upsides I like:

  • no need for the user to do the initial configuration of wifi on the photon nor the tablet, they already talk to each other
  • I can use the same app for the system on the users phone/tablet, and on the display that comes with the system.
  • Same look and feel, less development time since same code (almost the same code, one app will use cloud connection, the other will use serial/local)
  • no other software to learn (the display editor software)

Is that better, Jordy?

EDIT:

  • the system can run in standalone mode, no internet connection. The local tablet will not need any wifi configuration, nor the photon, at least for users running it in this standalone mode.

I think they are in the same price range than a similar size 4D display: around $150 USD


That seems to one way to go, like this guy did it with an Arduino.

I wonder if the communication photon-tablet via USB OTG would be as solid as I2C or SPI. That’s why I wanted to ask the community around for opinions.

Thank you all guys!
Gustavo.


#6

Thanks for elaborating! I hadn’t thought of the complete stand-alone mode, but that makes sense. I was thinking it might have been easier to code up local networking than it would be to interface over hardware. But for a no-configuration setup, direct access is probably preferable in this scenario.


#7

I also see there is a kiosk mode in Android.

Looking good!

EDIT: there are also apps like KioWare


#8

quote: "Imagine your system doesn’t have access to wifi"
if i imagine that then i imagine there is no access to cloud and the app that uses cloud connection is useless. plus, the photon is gonna sit there trying to connect. can it be programmed to not attempt a cloud connect at boot?


#9

You can set the photon for a “standalone” mode so that it runs without cloud connection. He also mentioned direct connection to the device so nothing needs to run on the cloud or internet.


#10

so what is the reference to the app that uses the particle cloud api? without wifi seems to me that does not work.


#11

With serial connection, you can trigger functions on the photon like any other mcu, the tablet gives you a user interface for this. I believe he was suggesting that it could be used either way, either with a cloud based app or not.


#12

right, that is what he is suggesting. the standalone thing is at some point going to need some way to update the photon. no wifi, no cloud. unless you need a second device with cellular data to run the cloud app.
edit: help me understand why a photon would be the goto microprocessor in this case since you start off by disabling one of the primary features, wifi. why not a rpi zero knockoff or similar?


#13

He wants to know whether that display can be used with the Photon and one of his usecases for his desire to use that display happened to be a non-connected one, but that doesn’t mean it’d be his only one.
Hence arguing against his personal decision is mute.

Alternative suggestions are welcome, but questioning someones needs just because you don’t feel the same isn’t helpful.

There are many threads that talk about (temporarily) disconnected use-cases in this forum and the people here who know the game didn’t argue against that, so asserting there was no point to that use-case seems somehow half-informed.


#14

Hi Douglas,
In a project I may potentially work in the near future, the desired position will be to have the system connected to the Internet. However, it would not be mandatory (just highly recommended!) and I think 90% of the users would connect the system to the internet.
In order to accommodate users that may not have the system connected I would need to add a display for them to control the system “locally”. So my process of thought was:
I am building an app already for this system, why would I need to code another “app”? (display app? since one codes screens for these displays in an editor software that the display company provides, like the Nextion Editor).

So, would there be a way to use the same app I’m developing for the remote use case in a “local” use case?
There could be a way, I believe, if I use a tablet that runs android and I can connect it locally to the photon, wired.

Is it clearer like that?
Million thanks for your thoughts!
Gustavo.


#15

I was thinking this is funny :laughing:.
20 years ago most embedded processors were connected to a hardwired display panel with buttons.
We have come so far that everything is wireless.
LOL


#16

i’m still very much learning about the particle cloud but my current understanding is as far as the photon the various encryption schemes are done at the system firmware level as it passes through the cloud connection via wifi. so it seems to me if you hard wire a photon to a android tablet then you are passing strictly data packets that are not encrypted for use at the particle cloud level. i might be wrong about that. you seem to be stating that you can write an app that then handles this from a device that is not a particle device, namely the android tablet. in this case the tablet is spoofing the particle device. it would seem to me if you can write an app that allows an android device to spoof a particle device the any device can spoof a particle device and i have always understood that was not possible. so, are you trying to use the tablet to spoof the photon or is something else going on i do not understand? thanks.


#17

nope, the tablet will not spoof at all the connections the photon makes to the cloud.

Via serial, the app in the tablet can send serial commands like “User clicked button 1”, and photon can send commands back to the tablet via serial to the app like “value for temperature is 40 degrees”. The tablet would act as an HMI device, or a dummy display.

Correct?


#18

yes, i get the part about tablet to photon. the part i do not get is the app you have supposedly on a third device like a cell phone that somehow uses the particle cloud api to get the photon data from the tablet to the cloud.


#19

in this “standalone mode” the cell phone will not be able to control the system, until the photon is not connected to the Particle Cloud. Nothing like photon-particle cloud will pass through the tablet.


#20

ok. then this standalone photon can never get anything to the cloud and can never be updated because there is no wifi so what is the point of using a photon? is it because maybe once a week or once-a -whenever the photon might get wifi to do its thing? it seems to me the photon is used to supposedly gather data that at some point needs to get to the cloud yet i do not understand how you plan to get it there. thanks.