bitluni / ESP32Lib

http://bitluni.net/esp32-vga/
441 stars 78 forks source link

Idea: keyboard/swipe input from iPhone via QR code #12

Open bootrino opened 5 years ago

bootrino commented 5 years ago

If you display a QR code on the screen, simply pointing an iPhone/iPad camera at it will scan the QR code - no app needed.

If the qr code contains a URL then it will ask the iPhone user and open the URL.

You could point that URL to a link local address https://en.wikipedia.org/wiki/Link-local_address like http://bitluni.local here is the QR code for http://bitluni.local which I made just using an online QR code generator https://imgur.com/MXRkYSV - try pointing your phone camera at it! (update: Actually I'm not sure if iPhones can access .local addresses, I'll have to check. update2: checked, .local addresses work OK on iPhone)

The link local named address (http://esp32fs.local) technique is seen here: https://github.com/espressif/arduino-esp32/blob/master/libraries/WebServer/examples/FSBrowser/FSBrowser.ino I believe it is done via ESPmDNS.h

You can then serve a page from the esp32 to the iphone and use websockets to send keystrokes from the iPhone to the esp32.

If you got really fancy you could actually send touch gestures like swipes from the phone to the esp32 to give the bitluni graphics a touch/swipe interface.

I don't know if Android camera is able to scan QR codes.

Taking it even further, you could send sounds from the esp32 to the phone web page to give sound output. Or as a game control input - multiple people could connect this way and play party games.

By the way, using QR codes is also a good way to send your YouTube audience to your Tindie page :-)

Update - sorry I see here you are already sending input from phone keyboard - so it's not a new idea https://www.youtube.com/watch?v=qJ68fRff5_k

techno94 commented 5 years ago

a qrcode is a sprite or an image. so with the utilitie, you could display an image of a qrcode. https://github.com/bitluni/ESP32Lib/blob/master/Utilities/SpriteEditor.html

after there is this librarie : https://github.com/anunpanya/ESP8266_QRcode

who permit to display a qrcode on an oled screen with just this instruction : qrcode.create("Hello world."); with this instruction, when you scan the qrcode it return : Hello world. so it's really easy to display. anyway, to do this, there is developpement.

bootrino commented 5 years ago

@techno94 there's no need to generate a QR code - you just use the one above which is about 395 bytes.