Transpile Golang into Arduino code to use fully automated testing at your IoT projects.

ESP32 Transpiler

Go Report Card Build Status BCH compliance

Purpose

The Arduino IDE is easy to use. But I faced problems like maintainability and testability at more complicated IoT projects. I needed to compile and flash the ESP32 before testing my code functionality by doing it 100% manually.

This solution transpiles Golang into Arduino code, which can be compiled to an image by using the ESP32 toolchain. Now I am able to use a fully automated testing approach instead of doing it 100% manually.

Important:

The Transpiler only supports a small subset of the Golang Language Specification. Look at the mapping and the tests to get the current functionality. It is also not possible to trigger the C/C++ Garbage Collection, because Golang handles it automatically "under the hood". Go strings will be transpiled to C constant char arrays, which could be handled on the stack.

Installation

go get -u github.com/andygeiss/esp32-transpiler

Usage

Usage of esp32-transpiler:
  -source string
        Golang source file
  -target string
        Arduino sketch file
Owner
Similar Resources

A opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with minimal TCO

infinimesh IoT Platform infinimesh is a opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with

Feb 14, 2022

Exploring and comparing different IOT messaging protocols / transports.

IOT Messaging Protocols Blynk https://blynk.io/ A fully integrated suite of IoT software Device provisioning Sensor data visualization Remote control

Jan 2, 2022

IoT platform with things/user management and visualization, in Go with Docker using microservices

BARIOT IoT platform to Manage Users and their Things and visualize their data. Microservices services architecture build with Go and docker (compose).

Jun 22, 2022

Golang DNSTAP sensor use to collect passive dns data from a recursive name server

dnstap-sensor DNSTAP-SENSOR is a Golang program that is used to collect passive dns data from a recursive name server and submit it to Deteque's DNSTA

Nov 21, 2022

A robust and easy to use MQTT rule engine

A robust and easy to use MQTT rule engine

⚙ MQTT COMMANDER A robust and easy to use MQTT rule engine Configure your MQTT Rules via easy to use YML Files Supports JSON encoded MQTT Messages Sup

Sep 21, 2022

Automatically updates the firmware of all your Shelly devices at once.

shelly-bulk-update Automatically updates the firmware of all your Shelly devices at once. Installation Download the binary for your platform: macOS cu

Nov 2, 2022

Golang implementation of PyMISP-feedgenerator

Go-MispFeedGenerator Generate MISP feeds without a MISP Instance! Go-MispFeedGenerator aka Go-MFG1000, is a library providing all functions needed to

Nov 23, 2022

Upbit auto trading bot with golang

Upbit auto trading bot with golang

Upbit auto trading bot How to Golang (download) Input 'Access key', 'Secret key'

May 11, 2022

Smq - Simple MQTT Broker with golang

Simple MQTT Broker å…ŗäēŽ Golang MQTT Broker, Version 3.1.1, and Compatible for ecli

Jul 7, 2022
Comments
  • Refactor service.go

    Refactor service.go

    I've selected service.go for refactoring, which is a module of 392 lines of code that couples the top-level components tightly. Addressing this will make our codebase more maintainable and improve Better Code Hub's Couple Architecture Components Loosely guideline rating! 👍

    Here's the gist of this guideline:

    • Definition 📖 Minimize the amount of interface code; that is, code in modules that are both called from and call modules of other components ("throughput"), and code in modules that are called from modules of other components ("incoming").
    • Why❓ Having loose coupling between top-level components makes it easier to maintain them in isolation.
    • How 🔧 You can hide a component's implementation details through various means, e.g. using the "abstract factory" design pattern.

    You can find more info about this guideline in Building Maintainable Software. 📖


    ℹī¸ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the 🔲 next to them. The risk profile below the candidates signals (✅) when it's enough! 🏁


    Good luck and happy coding! :shipit: :sparkles: :100:

Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of Things.

Jan 8, 2023
An embeddable lightweight Go/Golang MQTT broker(server) for IoT.
An embeddable lightweight Go/Golang MQTT broker(server) for IoT.

Snple MQTT įŽ€äŊ“中文 Note: The API of this library is still unstable and has not been sufficiently tested, please do not use it in production environments.

Sep 12, 2022
đŸŧ IoT worm written in pure golang.
đŸŧ IoT worm written in pure golang.

GoriaNet Most powerfull cross compiler (27arch). Kill process by port and check for duplicate instance. Killing process by port. Cross compiler. Infor

Oct 17, 2022
An Open-Source Platform for Quantified Self & IoT
An Open-Source Platform for Quantified Self & IoT

Heedy Note: Heedy is currently in alpha. You can try it out by downloading it from the releases page, but there is no guarantee that future versions w

Jan 1, 2023
Suite of libraries for IoT devices (written in Go), experimental for x/exp/io

Go libraries/drivers for IoT devices This repo contains a suite of libraries for IoT devices/sensors/actuators. The suite is meant to be as dependency

Sep 26, 2022
Make IoT a lot more fun with data.

Eywa What is Eywa? "Eywa is the guiding force and deity of Pandora and the Na'vi. All living things on Pandora connect to Eywa." -- Avatar Wiki Projec

Nov 28, 2022
A Go client for Google IoT Core

IoT A simple framework for implementing a Google IoT device. This package makes use of the context package to handle request cancelation, timeouts, an

Sep 26, 2022
Industrial IoT Messaging and Device Management Platform
Industrial IoT Messaging and Device Management Platform

Mainflux Mainflux is modern, scalable, secure, open-source, and patent-free IoT cloud platform written in Go. It accepts user and thing (sensor, actua

Dec 31, 2022
Next-generation IoT open source platform.
Next-generation IoT open source platform.

tKeel Next-generation IoT open source platform High performance, High security and easy to use tKeel is a strong and reusable IoT platform that helps

Dec 28, 2022
Whichip: discover (IoT) device's IP in local network
Whichip: discover (IoT) device's IP in local network

whichip: discover (IoT) device's IP in local network Install On (IoT) Device wget -O install.sh

Dec 8, 2021