Code Monkey home page Code Monkey logo

playground's People

Contributors

aykevl avatar deadprogram avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  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

playground's Issues

print doesn't show anything on the console

This doesn't show up in the console

print("ABC") // no output

This does

print("ABC\n")  // output: ABC

This works

println("ABC") // output: ABC

This "too"

print("ABC") 
print("DEF")  // output: ABCDEF

Ability to download UF2 files

Currently, Tthe compiler can only handle creating HEX files for download. We also need to be able to compile UF2 format files.

Playground website returns error when compiling

I am unable to compile any programs on the TinyGo Playground website:

This is the output in the right pane:

LinkError: WebAssembly.instantiate(): Import #8 module="env" function="syscall/js.valueNew" error: function import requires a callable

Add sharing feature

I think adding the code sharing feature would be great.
It will also have an impact on the spread of this project.

Screen Shot 2022-06-13 at 11 43 37

WS2812 colors incorrect on Circuit Play Express

This program works as expected on the actual hardware (red/blue LEDs) but on the simulator is red/green:

Screenshot from 2022-05-14 12-04-29

package main

import (
	"image/color"
	"machine"
	"time"

	"tinygo.org/x/drivers/ws2812"
)

var leds [10]color.RGBA
var led = machine.LED
var neo = machine.NEOPIXELS

func main() {
	led.Configure(machine.PinConfig{Mode: machine.PinOutput})
	neo.Configure(machine.PinConfig{Mode: machine.PinOutput})

	ws := ws2812.New(neo)
	rg := false

	for {
		rg = !rg
		for i := range leds {
			rg = !rg
			if rg {
				leds[i] = color.RGBA{R: 0xff, G: 0x00, B: 0x00}
			} else {
				leds[i] = color.RGBA{R: 0x00, G: 0x00, B: 0xff}
			}
		}

		ws.WriteColors(leds[:])
		led.Set(rg)
		time.Sleep(100 * time.Millisecond)
	}
}

I get an error when I try to run it locally

I get this message and I can't run it locally.

LinkError: import object field 'syscall/js.finalizeRef' is not a Function

end:
windows10 pro 64bit
tinygo 64d51b215f63a3b178c6337ab252086d16003ff7

git clone --recursive https://github.com/tinygo-org/tinygo.git tinygo5
cd tinygo5
git checkout dev
make llvm-build
make
make gen-device
make wasi-libc
make release

v0.18 error on playground

TypeError: WebAssembly.instantiate(): Import #0 module="wasi_snapshot_preview1" error: module is not an object or function

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.