question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I make a extenstion that support serialport devices to scratch?

See original GitHub issue

Expected Behavior

If I want to use scratch for my own Harware devices which has serialport on it ,How could I write a javascript extention that support it?

Actual Behavior

Actually I try to use npm install serialport ,and I write a .js file that opens a serialpor, But I can just run this file in node.js. How could I add this to scratch-vm or scratch-gui?

Steps to Reproduce

If you want to try this , you can run : sudo npm install -g serialport write a file : serialport.js const SerialPort = require('serialport')

Operating System and Browser

Ubuntu 16.04 Google Chorm 71.0.3578.98

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
XueYuSkycommented, Jan 29, 2019

scrarachserial1 I write a serial extension recently,it can open a serial port ,send messages,receive messages. But it still has some bugs to fix.

1reaction
cotestatntcommented, Dec 25, 2018

@XueYuSky , here you can find my actually implementation. Please take in mind, I’m not an expert programmer (especially with Javascript), I’m sure there’s a better method! For example, doing all the jobs in the same extension script ‘index.js’ so that it is not necessary to start the wsServer.js script manually.

https://github.com/cotestatnt/arduino-plus-scratch3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Output to serial or other. - Discuss Scratch
If you are willing to write your own interface to link to this serial port, you could then connect the interface through Scratch's...
Read more >
Scratch Arduino Extension - khanning.com
Select your serial port from the Tools > Port menu. ... Download and install the Scratch Extensions Browser Plugin for "other web browsers"....
Read more >
ScratchX
With Experimental Extensions, you can create Scratch projects that connect with external hardware (such as electronic devices and robotics) and online ...
Read more >
Arduino BLE with Scratch 3.0 - Doojin Kang - Medium
It can connect BT/BLE devices with the help of Scratch Link program. ... Please refer the following about how to make scratch 3.0...
Read more >
Getting started with the Web Serial API - Google Codelabs
In this codelab, you'll build a web page that uses the Web Serial API to ... and transform streams to communicate with serial...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found