Giter Club home page Giter Club logo

pxt-maker's Introduction

MakeCode Maker Actions Status

This is an experimental code editor for maker boards - try it at https://maker.makecode.com.

Who is this for?

This editor is meant for micro-controllers that are friendly to breadboarding. The editor is based on Microsoft MakeCode.

Local Dev Server

The local server lets you to run the editor and serve the documentation from your own computer.

Setup

  1. Install Node.js 8.9.4 or higher.
  2. Install Docker if you are going to edit any .cpp files.
  3. Clone the pxt repository.
git clone https://github.com/microsoft/pxt
cd pxt
  1. Install the dependencies of Microsoft/pxt and build it
npm install
npm run build
cd ..
  1. Clone the Microsoft/pxt-common-packages repository
git clone https://github.com/microsoft/pxt-common-packages
cd pxt-common-packages
npm install
cd ..
  1. Clone the Microsoft/pxt-maker repository
git clone https://github.com/microsoft/pxt-maker
cd pxt-maker
  1. Install the PXT command line (add sudo for Mac/Linux shells).
npm install -g pxt
  1. Install the pxt-maker dependencies.
npm install
  1. Link pxt-maker back to base pxt repo (add sudo for Mac/Linux shells).
rm -Rf node_modules/pxt-core
rm -Rf node_modules/pxt-common-packages
pxt link ../pxt
pxt link ../pxt-common-packages

If you want to know if your folders are link, run ls -l and it will indicate them.

ls -l node_modules/

Note the above command assumes the folder structure of

       maker.makecode.com
          |
  ----------------------------------
  |       |                        |
 pxt      pxt-common-packages  pxt-maker

Refresh dal.d.ts files

Whenever you make changes to the #defines in the .cpp files, you will have to refresh the dal.d.ts files. For that, run

pxt builddaldts

CODAL changes

If you need to do changes to CODAL itself, follow these steps.

  • create a new project in the web editor, then close the web server. Select the hardware you want to work with.
  • using a command prompt, open the projects folder and find the subfolder with your new project
  • open the folder in Visual Studio Code
code .
  • open pxt.json and edit the dependencies to use the file:... path instead of *
   dependencies: {
        "adafruit-metro-m0-express": "file:../../libs/adafruit-metro-m0-express"
   }
  • from the command line, set the PXT_NODOCKER environment variable to 1
export PXT_NODOCKER=1
  • run a local build that will create a CODAL checkout automatically. If you are missing tools, you will be notified by the build script.
pxt build --local --force
  • go to the built/dockercodal folder and open all CODAL in a new Visual Studio Code instance
cd built/dockercodal
code libraries/*
  • go to the Git tab in VS Code, and change the branch of the CODAL repository to work on to master. You can create a new branch to start doing your work and pull requests.

  • to build CODAL directly, run built/codal

python build.py
  • to rebuild your project from pxt, run pxt build --local --force from the project folder

Running

Run this command from inside pxt-maker to open a local web server

pxt serve

If the local server opens in the wrong browser, make sure to copy the URL containing the local token. Otherwise, the editor will not be able to load the projects.

If you need to modify the .cpp files (and have installed yotta), enable yotta compilation using the --localbuild flag:

pxt serve --localbuild

Updates

Make sure to pull changes from all repos regularly. More instructions are at https://github.com/microsoft/pxt#running-a-target-from-localhost

Repos

The pxt-maker target depends on several other repos. The main ones are:

Code of Conduct

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.

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.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., label, 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.

pxt-maker's People

Contributors

abchatra avatar aznhassan avatar bborncr avatar birbilis avatar chatelao avatar darzu avatar guriaregojo avatar idispose avatar jamesadevine avatar jwunderl avatar kalbeabbas avatar kmskelton avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mmoskal avatar msftgits avatar pelikhan avatar robotfreak avatar sabas1080 avatar shakao avatar tballmsft avatar wallarug avatar zhuowei 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-maker's Issues

No mapping on Trinket M0 A1/D2 pins with LIGHT in Maker

Describe the bug
An error in simulator Fritizing diagram when using LIGHT function in the Adafruit Trinket M0 board.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...
    https://makecode.com/_auYiA34yD9ap
    '
  2. Click on '...Edit.'
  3. Click on "Simulator"
  4. See error

Expected behavior
You should see 3 wires in the diagram (and you do if pins other than A1/D2 are chosen) ; there should be a wire to ground, to voltage and a third wire to the pin A1/D1 and the signal pad on the light strip.

Screenshots
Add screenshots to help explain your problem. You can copy paste the screenshot in the github report. The .gif screen recording is very useful as well.

Desktop (please complete the following information):

  • OS: Microsoft

  • Browser [e.g. chrome, Internet Explorer and Bing)
    20190126_113437

  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

add support for various parts

WebUSB or console device

Describe the bug
In version beta

MakeCode Maker (Cortex class) version: 0.6.4
Microsoft MakeCode version: 5.4.7

webusb only work when device reset in mode boot and download firmware. previously pair from the menu configuration

To Reproduce
Steps to reproduce the behavior:

  1. Pair device
  2. Download firmware with console.log include and never ends
  3. Reset device with double boton click, enter in mode boot and download firmware
  4. See error

My code

forever(function () {
    console.logValue("value", input.touchA0.value())
})

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • Version 71

Additional context
tested in mrk1300 and meow meow

Blocks serial available and read

Hi @mmoskal

My intention is to read the information of a device via serial, but I have noticed that the "Serial" package does not have the functions Serial.available and Serial.read

Is there any intention to add them?

Thanks

Status LED color on Gemma M0

I'm getting a magenta status color on the Gemma M0 when I load a .uf2 onto it. The code runs properly, just a funny color for the status light.

Serial not working with Arduino Zero

Describe the bug

As sson as I use a serial function such as serial.redirect(pins.TX, pins.RX, BaudRate.BaudRate115200) the arduino zero stops working.

A clear and concise description of what the bug is.

To Reproduce

let pir = false
serial.redirect(pins.TX, pins.RX, BaudRate.BaudRate115200)
loops.forever(function () {
pause(1000)
pir = !pir //pins.D7.digitalRead()
if (pir) {
pins.RXLED.digitalWrite(true)
pins.LED.digitalWrite(true)
} else {
pins.RXLED.digitalWrite(false)
pins.LED.digitalWrite(false)
}
})

The LED's are not flashing

When I comment out the serial.redirect, it works

Support for Wemos D1 mini / ESP8266

Is your feature request related to a problem? Please describe.
It seems to me the system is missing support for ESP8266 boards. Is anyone already working on this? is it planned?

Describe the solution you'd like
I'm willing to add support by myself if someone can point out to method / issues and confirm it is feasible.

Describe alternatives you've considered
None at the moment.

Additional context
SVG part for the Wemos D1 mini:
https://github.com/mcauser/Fritzing-Part-WeMos-D1-Mini

MKR1300 problem SPI and Serial

Describe the bug
Hello

I am trying to port the MKR1300 to MakeCode, but when trying to communicate through the SPI to the Murata module I lose the serial communication

My Sketch work with

//pins.spiFrequency(250000)
//pins.spiMode(0)
// pins.spiWrite(0x42 & 0x7F) let item: number let
// buf: Buffer pins.spiTransfer(buf, buf) item =
// pins.spiWrite(0)
forever(function () {
    serial.writeNumber(pins.A0.analogRead())
    console.log("" + pins.A0.analogRead())
    serial.writeLine("")
    pins.LED.digitalWrite(false)
    pause(500)
    pins.LED.digitalWrite(true)
    pause(500)
})

but my sketch not working with

pins.spiFrequency(250000)
//pins.spiMode(0)
// pins.spiWrite(0x42 & 0x7F) let item: number let
// buf: Buffer pins.spiTransfer(buf, buf) item =
// pins.spiWrite(0)
forever(function () {
    serial.writeNumber(pins.A0.analogRead())
    console.log("" + pins.A0.analogRead())
    serial.writeLine("")
    pins.LED.digitalWrite(false)
    pause(500)
    pins.LED.digitalWrite(true)
    pause(500)
})
HF2: Connected; msgSize 256B; flash 0kB; application mode
HF2: Board-ID: SAMD21G18A-MKR1300-v0 v2.0.0-28-g535500c-dirty fSFHWRO
HF2: recv error: could not read from HID device
hid: error  Timeout
hid: error  Cannot write to HID device

Expected behavior
A clear and concise description of what you expected to happen.

ok_test

kapture 2018-07-30 at 15 14 09

Desktop (please complete the following information):

  • OS: Mac
  • Browser Chrome

Additional context
I am trying to read a log via SPI of the Murata module of the MKR1300

Thanks

StandardSPIFlsah crash on SAMD

When initializing the storage system, the StandardSPIFlash crashes in the SPI stack:

Breakpoint 1, _pxt_panic::target_panic (statusCode=statusCode@entry=909) at /src/pxtapp/screen---st7735/panic.cpp:256
256     /src/pxtapp/screen---st7735/panic.cpp: No such file or directory.
(gdb) bt
#0  _pxt_panic::target_panic (statusCode=statusCode@entry=909) at /src/pxtapp/screen---st7735/panic.cpp:256
#1  0x000190bc in codal::ZSPI::startTransfer (this=0x20001468, txBuffer=0x0, txSize=0, rxBuffer=0x20007efc "", rxSize=20, doneHandler=0x0, arg=0x0)
    at /src/libraries/codal-samd/src/ZSPI.cpp:324
#2  0x00018c86 in codal::ZSPI::transfer (this=0x20001468, txBuffer=0x0, txSize=0, rxBuffer=0x20007efc "", rxSize=20)
    at /src/libraries/codal-samd/src/ZSPI.cpp:302
#3  0x00013f78 in codal::StandardSPIFlash::sendCommand (this=this@entry=0x200014b4, command=command@entry=3 '\003', addr=addr@entry=0,
    resp=resp@entry=0x20007efc, respSize=respSize@entry=20) at /src/libraries/codal-core/source/drivers/StandardSPIFlash.cpp:55
#4  0x00013fd2 in codal::StandardSPIFlash::readBytes (this=0x200014b4, addr=0, buffer=0x20007efc, len=20)
    at /src/libraries/codal-core/source/drivers/StandardSPIFlash.cpp:91
#5  0x0000b4a2 in codal::snorfs::FS::readHeaders (this=this@entry=0x200014c8) at /src/pxtapp/storage/SNORFS.cpp:344
#6  0x0000b7b0 in codal::snorfs::FS::mount (this=this@entry=0x200014c8) at /src/pxtapp/storage/SNORFS.cpp:445
#7  0x0000ba36 in mount (this=0x200014c8) at /src/pxtapp/storage/SNORFS.cpp:600
#8  codal::snorfs::FS::lock (this=this@entry=0x200014c8) at /src/pxtapp/storage/SNORFS.cpp:599
#9  0x0000ba98 in codal::snorfs::FS::tryMount (this=this@entry=0x200014c8) at /src/pxtapp/storage/SNORFS.cpp:430
#10 0x0000cdc0 in WStorage (this=0x20001468) at /src/pxtapp/storage/storage.cpp:29
#11 storage::getWStorage () at /src/pxtapp/storage/storage.cpp:32
#12 0x0000cde2 in storage::init () at /src/pxtapp/storage/storage.cpp:53
#13 0x00028f68 in ?? ()
#14 0x00028f68 in ?? ()

It crashes at
https://github.com/lancaster-university/codal-samd/blame/f0a8ea10c107df7982ffae00721a702472649053/src/ZSPI.cpp#L324

which is called from
https://github.com/lancaster-university/codal-core/blame/b7b314e44543487c7c124da1c966ed690ab6aa7d/source/drivers/StandardSPIFlash.cpp#L55

  • Looks like the assert needs to be updated
  • afterwards, fibers are not running anymore

Issue using LCD with Adafruit Metro M4

Describe the bug
@pelikhan - I've wired an Adafruit Metro M4 the same way the Metro M4 in the editor window is wired. Then I and added the LCD Show String block to print out "hello world". The LCD shows nothing, though it is turned on. This may be an issue where the wiring on the site is incorrect.

To Reproduce
Steps to reproduce the behavior:

  1. Go to LCD
  2. Click on LCD Show String "Hello World" at line 1

Expected behavior
LCD should display Hello World.

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome

Additional context
As a side-note, the LCD should be connected to the Metro's +5V instead of +3.3V (using this standard 16x2 LCD for reference; https://www.adafruit.com/product/181)

Multiplex SPI in SERCOM

Hi @pelikhan @mmoskal

Describe the bug
I have SPI working, but in the SERCOM4 default pins, how can I change that?

the change in config.ts does not work

How do I choose the SERCOM and PADs?.

Additional context
#60

Thanks

touch support broken

The pin resolution for input is not working anymore.

input.pinA0.onEvent(ButtonEvent.Click, function () {
	
})

Heroku Deploy

Hi

I'm trying to run my own version on a Heroku server, does anyone know the commands needed to do it or do you have an example?

Thank you

RedBoard Turbo w/ External Addressable LEDs

Describe the bug
Adding an external WS2812-based LEDs from the "Light" blocks seems to not fully work on other pins when using it with the SparkFun RedBoard Turbo under MakeCode Beta site. There seems to be issues controlling LEDs after 3 or 4 pixels. There also seems to be issues setting up all the LEDs to the same color. The on-board WS2812B stays lit with the color green even when not calling it.

Maybe I am setting it up incorrectly?

To Reproduce

  1. Connect external WS2812s to A1, 3.3V, and GND.
  2. Drag the Light > More > set strip to create WS2812 strip on LED with 30 pixels code block into the setup.
  3. Change LED to A1.
  4. Change 30 pixels to 5 pixels.
  5. Drag Light > More > set strip brightness 20 into the setup.
  6. Change brightness 20 to 150.
  7. Drag the Light > More > set strip show animation for 500ms code block into forever.
  8. Adjust 500 ms to 200` ms.
  9. Drag the Light > More > set strip all pixels to blue code block into forever.
  10. Add a few pauses between the animation and setting all LEDs to the same color.

Expected behavior
The 5x external WS2812 LEDs should animate and then all change to the color blue.

Screenshots
turbo makecode beta external addressable leds

Desktop (please complete the following information):

  • OS: Windows 10 (64-bit)
  • Browser:
  • Version: 72.0.3626.109 (Official Build) (64-bit)

RedBoard Turbo w/ Servo Block

Describe the bug
Issue with the servo blocks. Attaching a servo on the analog pins does not seem to work when using it with the SparkFun RedBoard Turbo under the MakeCode Beta site.

I am not sure if I am doing it correctly?

To Reproduce
Servo does not seem to move when it is connected to the analog pins A0-A5.

  1. Drag and set pins > servo write pin A1 to 0 in the forever loop.
  2. Drag and set loops > pause 1000 ms.
  3. Drag and set pins > servo write pin A1 to 180.
  4. Drag and set loops > pause 1000 ms.

Expected behavior
The servo should move between two positions every second on a PWM pin. The example works when the servo is connected to the PWM pins between D3-D13 but it does not work on A0-A5. Looking at the pinout, it does not seem like the RedBoard Turbo has any PWM pins on A0-A5?

Screenshots
https://makecode.com/_FPrd0969PMDA

Desktop (please complete the following information):

  • OS: Windows 10 (64-bit)
  • Browser: Chrome
  • Version: 72.0.3626.109 (Official Build) (64-bit)

Adafruit Tinket M0 tutorial doesn't load

Clicking the "blinky" tutorial from the home page gives me this error:
image

The Arduino Mkr also gives me this error.

Chrome Version 63.0.3239.132 (Official Build) (64-bit)
macOS

Feedback on maker.makecode.com

  1. The breadboard blends in with the background. I think it's more clear when there's a distinction:
    image
    vs.
    image

  2. The +/- "zoom" buttons in the bottom right only zoom the blocks. I would have expected them to at least zoom the simulator. The breadboard especially is helpful to zoom since there's a lot of detail there (whereas with the microbit simulator, the detail isn't as small.)

Download Error when running Local Dev Server

Describe the bug
Error when trying to download code when running Local Dev Server but not on the website.

To Reproduce
Steps to reproduce the behavior:

  1. Run "pxt serve" to start local dev server
  2. Click on "New Project"
  3. Select any board
  4. Select "Download"

It looks like it always tries to download to the device instead of downloading the hex file when running a local instance

Expected behavior
The expectation is for the file to be downloaded and a popup window to show "Download Completed"

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Mojave Version 10.14.3
  • Browser: Chrome
  • Version: 73.0.3683.103

Additional context
Maybe there is a configuration that needs to be set for running locally that I am not doing? I did not have this issue running a local instance in January. I even tried checking out an earlier commit when I know it was working and I still get the same error.

Serial.readline blocks with Arduno Zero

Describe the bug
serial.readString() blocks after entering a character.

Example Code:

serial.setBaudRate(BaudRate.BaudRate115200)
serial.attachToConsole()

forever(function () {
pause(300)
let data = serial.readString()
console.log(data)
serial.writeString(data)
})

RedBoard Turbo w/ Music Blocks

Describe the bug
Issue with "Music" blocks. The buzzer does not seem to be functioning on A0 when using it with the SparkFun RedBoard Turbo under MakeCode Beta site.

To Reproduce
When attaching a piezo buzzer to the DAC on A0, it does not seem to work. "Adafruit Circuit Playground Express" seems to work on pin A0.

  1. Drag the Music > play sound "ba ding"code block.
  2. Insert into the forever loop.

Expected behavior
The board should make a sound when the code executes the forever loop. Specifically a coin sound effect.

Screenshots
turbo makecode betabuzzer

Desktop (please complete the following information):

  • OS: Windows 10 (64-bit)
  • Browser: Chrome
  • Version: 72.0.3626.109 (Official Build) (64-bit)

Not Working Blink in any board

Describe the bug
the latest stable and beta web version does not work the blink, it seems the board is broken

To Reproduce
Example blink

tested on:

  • SAMD21 sparkfun
  • Meow Meow
  • MKR1300

Desktop (please complete the following information):

  • OS: MacOS Sierra and Windows 10
  • Browser Chrome
  • Version 70

Serial read not read complete sentence

Describe the bug
i am work with beta version and serial for GPS, serial.readUntil not work as previous version, sentence from GPS are not complete

example:

previous version the data recieved is:

$GPRMC,222313.000,A,2151.1814,N,10218.8003,W,0.00,284.07,060119,,,D*76

and the new version is

RMC,222313.000,A,2151.1814,N,10218.8003,W,0.00,284.07,060119,,,D*76

To Reproduce
Use my code

serial.setBaudRate(BaudRate.BaudRate9600)
serial.setRxBufferSize(90)
forever(function () {
    console.log(serial.readUntil(Delimiters.NewLine))
})

Screenshots

makecode maker blocks javascript editor 26
makecode maker blocks javascript editor 27

Desktop (please complete the following information):

  • OS: MacOS
  • Browser chrome
  • Version 71

Additional context
Tested in arduino boad MKR1300

Remaining TODOs for BFA 2019

Beads

JACDAC drivers for Color bead

  • Detect R G or B for bead.

JACDAC drivers for Motion bead

  • Detect shake / be able to tweak shake sensitivity.

JACDAC drivers for Proximity bead

  • Complete i2c TS proximity bead driver (close / near / far)
  • Translate driver into TS-jacdac driver

JACDAC drivers for Light bead

  • Detect visible light level for bead.

JACDAC drivers for Motor bead

  • Complete i2c TS motor bead driver (continuous rotate, pan, or tilt)
  • Translate driver into TS-jacdac driver

Designer Testing Scenarios

  • Brain + Motion + LED strips
  • Brain + Tattoo + Motor
  • Brain + Tattoo + Motor + LED strips
  • Brain + Tattoo + LED Strips
  • Brain + Proximity + LED Strips
  • Brain + Color Sensor + LED Strips
  • Brain + Light Sensor + LED Strips
  • Brain + Motion + Tattoo + LED Strips

Extension

  • Name a bead functionality
  • Generate block based on interface planning
  • Program tattoo

Assembly instructions not working

Describe the bug
After clicking on the "Open assembly instructions" only the title is displayed. This is true for multiple boards and tutorials. (I was using the trinket blinky example)

To Reproduce
Steps to reproduce the behavior:

  1. Open a blinky tutorial or create a new project.
  2. Click on 'Open assembly instructions'
  3. window pops up, only prject name is shown.

Expected behavior
I'm expecting build instructions.

Screenshots
image

Desktop (please complete the following information):

  • OS: windows 10
  • Chrome V70
  • IE 11.2551

Seems to work ok for stichkit, but not the other adafruit boards

Additional context
Add any other context about the problem here.

Keyboard blocks cannot accept variable

Trying to do this doesn't work:
screenshot 5

I can get it to work in the javascript editor using

let item = 0
loops.forever(function () {
    keyboard.type(pins.A0.analogRead().toString())
})

Compilation always fails for NRF52832 based boards

Describe the bug
Compilation error when trying to download project code for both the redbear-ble-nano and the adafruit-feather-bluefruit-nrf52 which are both based on the NRF52832

To Reproduce
Steps to reproduce the behavior:

  1. Go to "New Project"
  2. Select the redbear-ble-nano or the adafruit-feather-bluefruit-nrf52
  3. Select download
  4. See error

Expected behavior
Hex file to be generated and downloaded

Screenshots

screen shot 2019-01-18 at 7 45 58 am

screen shot 2019-01-18 at 7 46 54 am

screen shot 2019-01-18 at 7 48 22 am

screen shot 2019-01-18 at 7 48 47 am

Desktop (please complete the following information):

  • Device: MacBook Pro
  • OS: macOS Mojave 10.14.2
  • Browser: Chrome
  • Version: 71.0.3578.98

Adafruit Metro M0 Express onboard neopixel shines brilliant while running program.

Describe the bug
After upload of program to Metro M0 Express, when program does not include any mention of control of on-board neopixel (green- the one that shines when re-set button is pressed prior to flashing code) then glows very brilliant green while code is running for the duration of program.

To Reproduce

https://makecode.com/_fbCPM0Hz79E5

Do not expect to see brilliant green LED pixel during entire running of the code.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
    Microsoft Surface; Windows 10 , Chrome Browser

Also note that simulator does not alter the string as programmed when resistance is changed ; expected the string to update message as resistance increases as in code.

SPI support ?

Hi

I am testing with a sparkfun dev board

I want to try an SPI sensor, but I do not see any examples

I tried with

spiPins(mosi: DigitalPin, miso: DigitalPin, sck: DigitalPin)

but it does not look like a valid command

Thanks

RedBoard Turbo w/ Buttons

Describe the bug
There seems to be no internal pull-up resistor for a button press leaving any button floating as shown in the simulator. I'm not sure if we would need to include an image of a pull-up resistor in the simulator just like the LED's current limiting resistor for those that happen to use a button/switch?

To Reproduce
When attaching a momentary push button on any I/O pin, the pin is floating.

  1. Drag the logic > if then code block in to the forever.
  2. Drag and set button D8 is pressed into the if's condition statement.
  3. Drag and set pin > digital write pin LED to HIGH as the result.
  4. Drag and set pin > digital write pin LED to LOW under the else's result.

This can be fixed with a physical pull-up resistor to the 3.3V pin or setting the pin as an internal pull-up code block (i.e. set pull pin ____ to up). That might be more work than necessary since it depends on the setup. It will probably just need an example for documentation instead of having it in the simulator?

Expected behavior
Pushing a button should turn on the built-in LED on pin 13. When the button is not pressed, the LED should remain off.

Screenshots
https://makecode.com/_FiU3hK5AADCW

Desktop (please complete the following information):

  • OS: Windows 10 (64-bit)
  • Browser: Chrome
  • Version: 72.0.3626.109 (Official Build) (64-bit)

Chrome error visible

Hi

Describe the bug

Sometimes it does not load the page correctly and the following errors appear in the console

Screenshots
captura de pantalla 2018-10-27 a la s 18 22 58

Desktop (please complete the following information):

  • OS: Mac OS Sierra
  • Browser Chrome
  • Version 70

Additional context
In oficial page and local server

Thanks

Serial function available

Hi

The function serial write, read or select pin TX and TX or port 2, available?

I would like to use the serial port 2 of my board

Thanks

Setting device name

For the log, setting the device name for the console service doesn't set the name and isn't reflected in the log as well.

PWM option for music

Trying out the music blocks on a Gemma M0 -- works well w a speaker on A0, wonder if there could be an option to configure for PWM when using a piezo?

UTF8 characters corrupted in terraterm

Describe the bug
Potential issue with UTF8 encoding through serial.

To Reproduce

Run

let i = 0;
serial.attachToConsole()
forever(function () {
    pins.LED.digitalWrite(!!(i % 2))
    console.log(`test â, ê, î, ô, û ${i++}`)
    //console.log(`test ${i++}`)
    pause(500)
})

and read the stream in terraterm. Output:

test â, ê, î, ô, û 543
test â, ê, î, ô, û 544
test â, ê, î, ô, û 545
test â, ê, î, ô, û 546
test â, ê, î, ô, û 547
test â, ê, î, ô, û 548
test â, ê, î, ô, û 549
test â, ê, î, ô, û 550
test â, ê, î, ô, û 551
test â, ê, î, ô, û 552

support for Beaglebone boards

Is your feature request related to a problem? Please describe.

This feature request is supposed to initiate a discussion regarding adding support for Beaglebone boards in the pxt-maker target, I have been working on a separate Makecode target, starting from the pxt-maker sources to include support for the Beaglebone boards and was successful(live simulator) in implementing basic support for the Beaglebone Boards.

I would like to work on integrating my solution with the pxt-maker repository and bring in Beaglebone Boards support directly through the Makecode Maker target rather than creating a separate target for the same.

Describe the solution you'd like

I would like to have the Beaglebone Boards support delivered directly through Makecode Maker target rather than creating a separate target for the same. I am willing to work on the integration and would like to hear your valuable feedback on the same.

Describe alternatives you've considered

I have tried to create a new PXT target starting from the pxt-maker sources for providing the Beaglebone Support and was successful in implementing basic support for the same. I believe that it would be better to have the Beaglebone support served through the Makecode Maker target and would like to work on integrating the existing solution with the pxt-maker codebase.

Additional context

I have uploaded some quick test videos for the pxt-beaglebone target which you can find here :

Please let me know if you require any other details from me, Thank you.

slide switches UI bug on HID mouse button block

clicking the slide switch for the first time results in confusing UI
screenshot 31

the bottom mouse button block is how it appears on first click of the slide swtich. It straightens itself out after clicking it two more times and looks like the top mouse button block

using Chrome on windows 10

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.