npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ardujsc

v1.0.21

Published

This package is for compiling javascript code to arduino code

Downloads

2

Readme

ArduJSC

Do you love arduino's but don't want to write program in c++? Me too, so I wrote this.

This is CLI that compiles basic javascript code into c++ code for arduino. It's experimental at this time, it can do only basic codes like arduino blink example and similar. Please note that this is still experimental. If you like this and/or you want to support me and development of this and my other projects, consider donating

ArduJSC is open source, you can find it on Github

Features

What can it do?

  • Compile & upload basic javascript code to arduino

Changelog

  • Added automatic code upload to arduino

Docs

YouTube video

https://youtu.be/Io5NYc-U4X4

Example

/*
This is the main file of project 'Example' created by MartinGamesCZ.
This is arduino project that was created using ArduJSC.
*/

const { pinMode } = require("./libraries/ardujsc-arduino/index.js");
var Arduino = require("./libraries/ardujsc-arduino/index.js");

var i = 0;
var n = 2;
var t = "string lol"

function setup() {
    pinMode(13, "OUTPUT");
    Serial.begin(9600);
}

function loop() {
    digitalWrite(13, "HIGH");
    delay(i);
    digitalWrite(13, "LOW");
    delay(i);
    i + 8
    Serial.println("I is:" + i.toString())
}

This will be converted into this:

/*
    Example by MartinGamesCZ

    This project was written in javascript and converted to arduino using ArduJSC.

    To upload this file, just open it in arduino ide and upload it to your board.
*/

#include <Arduino.h>
int i = 0;
int n = 2;
String t = "string lol";
void setup() {
    pinMode(13, OUTPUT);
    Serial.begin(9600);
};
void loop() {
    digitalWrite(13, HIGH);
    delay(i);
    digitalWrite(13, LOW);
    delay(i);
    i + 8;
    Serial.println("I is:" + String(i));
};

Instalation

To install this, you need to have nodejs and npm installed. Download this using npm i ardujsc -g You can verify installation by running ardujsc help. You also need to have arduino IDE installed in C:\Program Files (x86)\Arduino. You can find it on here. Custom installation path will be supported in next version.

Usage

Firstly, go into folder where you want project to be created. Then execute ardujsc created, this will prompt you to enter project name, main file (must end with .js) and author. After project is created you can go into folder with your project name. There should be your main file, open it and you can start programming!

To compile code, execute ardujsc compile inside your project folder. Then enter port of your board (you can find it inside Arduino IDE). Enter board type (nano, uno, micro, etc) and press enter. Code will be compiled and uploaded into your board.

Contact