Most recent activity
-
- 8 comments
- 4,498 views
-
Very, cool, @allObjects!
I wrote it because I wanted to develop without having the thing (my ESP8266) attached and writing to it every time I wanted to test a screen render.
This, also, is part of a dev environment I'm working on (http://forum.espruino.com/conversations/319462), starting with a sample boirlerplate and example app written using Typescript, as well as some utility functions to compile, minify and upload to the device, all from VSCode.
I'm planning on moving the emulator as an npm module; this would let me write Typescript (with the benefits of modularization, typed variables, autocompletion, in-place docs, etc) and also test the running code in a simple to use environment.
I'll keep working on it and try to keep it updated while working on my projects (not much time, bc it's all I have) but can help anyone interested on it.
-
Ok, I just pushed a Typescript boilerplate for espruino, which optimizes pretty heavily just before building the code.
https://github.com/mfgea/espruino-ts-boilerplate
Hope it helps!
-
Hey, y'all!
I'm working on a Espruino Emulator, written in JS and ment to be run by the browser. My final goal is to have an emulator capable of running any code that can be run in a espruino device and also emulate periphereals like sensors, actuators, output devices, etc.
I was able to run a simple app with an emulated SSD1306 (which renders to an html canvas) and an emulated Rotary Encoder (which pulses the stream of data to simulate the encoder movement).
I have the code in espruino-emulator I will be slowly improving it and adding documentation. Anyone is invited to collaborate and ask for improvements.
As a caveat, I don't have many sensors or devices (I only own an Arduino Uno and a few ESP8266) and it's not easy to get any of them here in Argentina (and when you find one it is expensive as well).
Hope is helpful for anyone.
Regards!
Thanks, @Wilberforce and @Gordon!
Actually I'm running on a Mac, which should not make much difference anyway, so I'll try compiling for linux. Of course, doing a complete emulator that behaves just the same would be very hard, and also maintaining could be an exhaustive task, so your solution, with the possibility of attaching some emulated components, would be ideal.
I started in the browser because it is an extremely simple i/o interface, so, if I succeed with the linux compile, I'll try to attach it to the browser somehow, maybe through a browser extension or something.
I'm also surprised there's nothing like I'm suggesting, as I believe could be quite handy for everyone.
Right now, my emulator works for me, as I'm trying to develop the logic around a thermostat (SSD1306, DHT22, Rotary encoder and some LEDs) and I'm not worried about constraints of the device, but that would be helpful to implement as well.
So, I'll try all those things. Thanks again!