kaluma-project / kaluma Goto Github PK
View Code? Open in Web Editor NEWA tiny JavaScript runtime for RP2040 (Raspberry Pi Pico)
Home Page: https://kalumajs.org
License: Apache License 2.0
A tiny JavaScript runtime for RP2040 (Raspberry Pi Pico)
Home Page: https://kalumajs.org
License: Apache License 2.0
.clear
-- clear js context.help
-- show all available REPL commands.mem
-- show memory status.gc
-- Enforce garbage collectionThe pin number for ADC/PWM is GPIO pin number (0~49 for stm32f4discovery target).
i2c_write
, i2c_read
functions should be defined separately for master and slave.i2c.c
, mode
is global variable. This mode
should be shared among multiple I2C bus(es)?Interrupt functions: (before implement, thinking about theses are really needed)
attachInterrupt(pin, callback, event)
pin
callback
event
: RISING
, FALLING
, CHANGE
, LOW
, HIGH
detachInterrupt(pin)
disableInterrupts()
enableInterrupts()
Constants for event should be re-organized.
LOW_LEVEL
= 0 (bit 0)HIGH_LEVEL
= 2 (bit 1)RISING
= 4 (bit 2)FALLING
= 8 (bit 3)CHANGE
= RISING | FALLING
= 12 (bit 2 and 3)GPIO
class should have more functions
gpio.irq(callback, event)
MicroPython ref: https://docs.micropython.org/en/latest/library/machine.Pin.html#machine.Pin.irq
buffer.c
to targets/kameleon-core/src
and buffer.h
to targets/kameleon-core/include
tty.h
_Error_Handler
SetPendSV
in system.h
?IOT.js and Espruino uses duty value in between 0.0 and 1.0.
Instead of jerryx_print_...
, use console.log
implementation.
Show Error.message in REPL
A way needed to stop the following code.
while (true) {};
Solution:
Ctrl+C
key in REPL. (key should be processed in interrupt).Compared to Espruino Board: http://www.espruino.com/EspruinoBoard
What about gpio_set_pin_mode(pin, mode)
?
example)
> console.log("test");
'test'
>
Single quote should be eliminated.
Enhance toString()
for Array, Object, Function, etc. like in Node.js
For examples)
>"asdfasdf"
'asdfasdf'
>[1, 2, 3]
[1, 2, 3]
>{ a:1, b:2}
{ a: 1, b: 2 }
>[1, 2, "test", function () {}]
[1, 2, 'test', [Function]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.