ESP8266 Smartwatch as Controller

Post Reply
User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

ESP8266 Smartwatch as Controller

by Jeija » Post

Since my Lua HTTP API code has been merged just recently, I thought I could make a little video that shows how these features can be used.

In my case, I am using a DIY ESP8266-based WIFI Smartwatch with integrated gyroscope and accelerometer as a controller for minetest. I hope this is an inspiration to some modders to make good use of the new HTTP APIs. You could also use these APIs to extend your mods with collaboration features (store creations online, trade between game servers, access outside resources / webpages from within minetest and much more).

Click this picture to watch the video on YouTube:

Image

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: ESP8266 Smartwatch as Controller

by benrob0329 » Post

That's awesome!

User avatar
jp
Banned
Posts: 947
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith
Location: France

Re: ESP8266 Smartwatch as Controller

by jp » Post

A good way to have cramps after 1h of playing. But nice prowess ;)

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: ESP8266 Smartwatch as Controller

by philipbenr » Post

Cool. All you need now is a set of VR goggles to go with it. XD. would be fun though...

User avatar
srifqi
Member
Posts: 570
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

Re: ESP8266 Smartwatch as Controller

by srifqi » Post

... *speechless* ...
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

User avatar
indriApollo
Member
Posts: 146
Joined: Fri Sep 26, 2014 11:34
GitHub: indriApollo
IRC: indriApollo
In-game: SudoAptGetPlay
Location: Belgium
Contact:

Re: ESP8266 Smartwatch as Controller

by indriApollo » Post

Your smartwatch is the server right ? And the game has to poll for directions on a rapid interval (or is it the other way around ?)

EDIT : You answer that in the video, I just had to listen till the end (sorry)

TitiMoby
Member
Posts: 17
Joined: Mon Sep 19, 2016 09:00
In-game: titimoby

Re: ESP8266 Smartwatch as Controller

by TitiMoby » Post

Your work is amazing.
Now, the problem is I didn't find example of your Lua Http API.
The doc is a bit hard for me, is there any example somewhere ?

User avatar
Jeija
Member
Posts: 686
Joined: Fri Dec 23, 2011 21:46
Location: Nürtingen, Germany

Re: ESP8266 Smartwatch as Controller

by Jeija » Post

Something like this should get you started:

Code: Select all

local http_api = minetest.request_http_api()
if not http_api then
	print("ERROR: in minetest.conf, this mod must be in secure.http_mods!")
end

minetest.after(5, function()
	http_api.fetch({
		url = "http://example.org",
		timeout = 1
	}, function (res)
		print(dump(res))
	end)
end)

TitiMoby
Member
Posts: 17
Joined: Mon Sep 19, 2016 09:00
In-game: titimoby

Re: ESP8266 Smartwatch as Controller

by TitiMoby » Post

Thanks a lot, I'll start like this and keep you informed when something happens ;)

TitiMoby
Member
Posts: 17
Joined: Mon Sep 19, 2016 09:00
In-game: titimoby

Re: ESP8266 Smartwatch as Controller

by TitiMoby » Post

First step is done : Minetest is able to retrieve data from devices through MQTT.
To resume, I use [url-www.eclipse.org/ponte]Ponte[/url] to have a bridge between HTTP and MQTT worlds.

An Esp8266 Huzzah is publishing a message to the MQTT part of Ponte server.
Then the Minetest mod fetch it through the feed Url.

Image

I have to figure out how to push data from Minetest now.

Once more, thanks Jeija for the help

Jane Simmons
New member
Posts: 1
Joined: Tue Jun 27, 2017 16:22

Re: ESP8266 Smartwatch as Controller

by Jane Simmons » Post

Hey guys, has anybody tried a different smart watch other than ESP8266? Thoughts on the Garmin vívoactive HR GPS?

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests