Git Product home page Git Product logo

nodemcusimulator's Introduction

NodeMCU Simulator

Simple Simulator for the NodeMCU (ESP8266) hardware. This project is VERY early on, and is not nearly built out. It was started because I was tired of the test cycle of writing the Lua files to hardware and testing with actual hardware.

This project is built around LuaJ (http://www.luaj.org/luaj/3.0/README.html) with the NodeMCU API mocked out in Java, the best possible. Since the NodeMCU API's (http://nodemcu.readthedocs.org/en/dev/) are implemented in Java rather than hardware it will never be 100% correct, but this project aims to get close.

Please, if anyone is interested, help is definitely welcome to make this more complete. Some ideas is to implement more of the UI (at least ADC), and possibly extend it to have a System Out console, and maybe even Lua Debugger.

To run, simply build and execute the Main class. The simulation will automatically kick off the 'init.lua' file in the working directory. A sample blink program has been included.

The following API's have some / all work done:

Gpio

Keeps the pin states in memory, and allows for external interrupt / triggering. All functions are working except 'serout'.

Net

Just the beginnings of the net API is complete. It's just enough to create a simple client (No Server Yet).

Timer

Large portion of the important parts of the API are complete (alarm, register, unregister, start). Needs some work to be complete but works in separate Java threads, so no busy CPU.

Wifi

Dummy module for now, just retains state. Really just so I could run 'real' programs w/o it blowing up (Since a PC is often operating just as a STATION and already connected).

Json

Fully implemented version (in Lua). Easier to implement in lua (borrowed function), since there is no built in mechanism to Coerce a Lua Table to a Java Map.

MQTT

MQTT Functionality is fully implemented except for LWT. There is a sample that utilizes test.mosquitto.com to connect to. This is a free public test server that provides for simple testing. See sample init.lua for examples.

TODO: UI Implementation. Would be nice to have a list of messages sent / received for debugging purposes.

nodemcusimulator's People

Contributors

jcrygier avatar pvaass avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.