GithubHelp home page GithubHelp logo

microsoft / jacdac-esp32 Goto Github PK

View Code? Open in Web Editor NEW
20.0 11.0 5.0 450 KB

Jacdac wired protocol implementation for ESP32

License: MIT License

CMake 1.01% Makefile 3.75% C 79.67% JavaScript 4.30% Python 10.29% Shell 0.98%

jacdac-esp32's Introduction

DeviceScript Runtime for ESP32

This repo contains implementation of DeviceScript virtual machine and runtime for ESP32. See https://microsoft.github.io/devicescript/devices/esp32 .

Building

Install ESP-IDF. Make sure IDF_PATH is set. You can also install ccache to speed up builds. You will need to run export.sh from the IDF folder - the Makefile will remind you.

To build run make.

To deploy run make r.

TODO

  • test flash jacs storage

  • test sensor watchdog

  • test cloud watchdog

  • add Jacs restart/crash blinks

  • add Jacs user blink

  • some blink for no Jacs program?

  • linker-override panic_restart() - do some blinking in there

  • synchronize timeseries ends to limit number of uploads

  • save current time in some RTC register so it survives reset (for stored cloud uploads)

  • 'failed' response for HF2 send

  • report Wi-Fi RSSI from tsagg

  • deal with Discrete from motion sensor

  • user-accessible watchdog in Jacscript

  • restart on infinite loop (hw-watchdog)

  • impl. watchdogs in tsagg + azureiot

  • blink on upload

  • save program in flash

  • multiple Wi-Fi networks saved

  • add HF2 over USB Serial (CDC)

  • set "CLIENT" flag in announce

  • disable self-reports coming from the wire

  • don't forward restricted packets to the wire from USB or loopback

  • only accept restricted packets from USB or loopback

  • add restricted flag in frame flags

  • re-enable wifi service - think about auto-connect?

  • implement Azure IoT Hub connection and IoT Hub health service

  • implement Jacscript Cloud service using IoT Hub

  • add auto-upload function in Jacscript and precompile for common modules

  • implement reset_in as hw-watchdog

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

jacdac-esp32's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar mmoskal avatar pelikhan avatar urish avatar xmeow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jacdac-esp32's Issues

Unable to use screen on LILYGO TTGO T-Display

I wanted to use DeviceScript to play with TTGO T-Display. I have created a custom .board.json file (see below) and assigned pins as specified in board's pinmap and schematic. However it is not possible to use pins 16 and 17, because they have been assigned psram function here https://github.com/microsoft/devicescript-esp32/blob/main/boards/esp32/arch.json#L18-L19, yet pin 16 is required for screen to work.

This board is based on ESP32-D0WDQ6 which specifies in datasheet that it is not recommended to use those two pins, yet it uses them.

Would it be possible to change the mentioned arch.json so that pins 16 and 17 can be used? Or is there some other way around this issue?

2024-01-15 at 23 53 11@2x

2024-01-15 at 23 53 45@2x

❯ yarn build
yarn run v1.22.19
$ npm run build:devicescript

> [email protected] build:devicescript
> devicescript build src/main.ts

using devs: v2.16.1, runtime: v2.16.1, node: v20.9.0 from <redacted>/my-proj/node_modules/@devicescript/cli/built
<redacted>/my-proj/boards/ttgo_display.board.json(1): GP17=17 has 'psram' function
GP16=16 has 'psram' function
boards/ttgo_display.board.json
{
  "$schema": "https://raw.githubusercontent.com/microsoft/devicescript-esp32/main/boards/esp32deviceconfig.schema.json",
  "devName": "ttgo-display",
  "productId": "0x3a7ec069",
  "$description": "LILYGO TTGO T-Display",
  "archId": "esp32",
  "url": "https://www.lilygo.cc/products/lilygo%C2%AE-ttgo-t-display-1-14-inch-lcd-esp32-control-board",
  "pins": {
    "SDA": 21,
    "SCL": 22,
    "GP17": 17,
    "GP2": 2,
    "GP15": 15,
    "GP13": 13,
    "GP12": 12,

    "GP36": 36,
    "GP37": 37,
    "GP38": 38,
    "GP39": 39,
    "GP32": 32,
    "GP33": 33,
    "GP25": 25,
    "GP26": 26,
    "GP27": 27,

    "MOSI": 19,
    "SCK": 18,
    "CS": 5,
    "GP16": 16,
    "GP23": 23,
    "GP4": 4,

    "GP34": 34,
    "PWR": 14
  },
  "services": [
    {
      "service": "button",
      "name": "button1",
      "pin": 0
    },
    {
      "service": "button",
      "name": "button2",
      "pin": 35
    }
  ]
}

Problem with ESP32 DevKit M pinout

In the "@dsboard/esp32s3_devkit_m" some pins are to set up correctly for ESP32-DevKit-M

For example, the pin 49 is set to Input only, but in the docs and the image below, 46 should be Input and Output.

image

I think it is getting this config from the arch.json, but its not correct for DevKit M.

Also I am trying to write a Liligo t-display-s3 board config, but I don't know how to overwrite this config.

image

Deploy error: timeout (3000ms) waiting for response to YV00/2[1]: 0x80 sz=4: 40280000

Hi, I'm currently playing around with esp32c3_supermini and while in devs devtools --serial, I'm sometimes getting the following error:

Deploy error: timeout (3000ms) waiting for response to YV00/2[1]: 0x80 sz=4: 40280000
and
Deploy error: no ACK for YV00/62[3]: 0x8f18 sz=224: 636f64653a207b307d2e00646973636f6e6e6563...
and

serial error: serial device 303a:1001 (write error: ENXIO: no such device or address, write)
serial error: serial device 303a:1001 (Error: ENXIO: no such device or address, write)
serial error: serial device n/a (write error: Cannot call write after a stream was destroyed)
Timeout (150ms)
Timeout (150ms)
image image

Could you please help me understand why that could happen or what could be causing these errors? So far, I'm noticing they are happening randomly. I'm happy to provide parts of my code if needed. Thank you!

Removal of e-Tugra root certificate

Description
Certifi 2023.07.22 removes root certificates from "e-Tugra" from the root store. These are in the process of being removed from Mozilla's trust store.

e-Tugra's root certificates are being removed pursuant to an investigation prompted by reporting of security issues in their systems. Conclusions of Mozilla's investigation can be found here.

Informations

Manifest Path : scripts/ca-bundle.pem

ACTION REQUIRED: Microsoft needs this private repository to complete compliance info

There are open compliance tasks that need to be reviewed for your jacdac-esp32 repo.

Action required: 4 compliance tasks

To bring this repository to the standard required for 2021, we require administrators of this and all Microsoft GitHub repositories to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your microsoft GitHub organization.

Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/jacdac-esp32/compliance

  • The GitHub AE (GitHub inside Microsoft) migration survey has not been completed for this private repository
  • No Service Tree mapping has been set for this repo. If this team does not use Service Tree, they can also opt-out of providing Service Tree data in the Compliance tab.
  • No repository maintainers are set. The Open Source Maintainers are the decision-makers and actionable owners of the repository, irrespective of administrator permission grants on GitHub.
  • Classification of the repository as production/non-production is missing in the Compliance tab.

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

GitHub inside Microsoft program information

More information about GitHub inside Microsoft and the new GitHub AE product can be found at https://aka.ms/gim or by contacting [email protected]

FYI: current admins at Microsoft include @jamesadevine, @teddyseyed, @mmoskal, @tballmsft, @sehodges, @pelikhan, @mgabrieledamone, @tracyttran

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.