Comments (11)
@roctopwerk
My Fork you are welcome to import and try out, but it's not 'official'. It's been working for me so far.
github.com/Cybot101/pxt-filesystem
I haven't had time to clean up for a Pull Request here.
from pxt-filesystem.
It looks like there is an issue with the StringData type being passed into the files.cpp methods.
I've 'hacked' together a working version that simply replaces all the StringData arguments with String, and adjusted where needed, but I haven't yet properly tested and verified it.
from pxt-filesystem.
I'm too trying to write to serial:
input.onButtonPressed(Button.B, function () { basic.showNumber(1) serial.redirectToUSB() serial.writeLine("dit is een test1") let my_data = "output.txt" files.appendLine( my_data, "lll,lll,dddl,ll099" ) files.readToSerial(my_data) })
I followed tutorial on:
https://www.dendrite.me/media/output/mediaid/5a13f86908d73406ab61317c
and when I say:
serial.writeLine("dit is een test1")
It works great and I see it in tera term "dit is een test1"
but when I try to do it like this:
files.readToSerial(my_data)
nothing is showed :(
In the simulator it works, but on Micro:bit it doesn't show up.
from pxt-filesystem.
I just test it with python and writing file is working perfect :)
For my students I really need JavaScript and it would be great to get this done with JavaScript and to avoid python
from pxt-filesystem.
I see there are many commits, how could I include the old commits of the file to my makecode on windows? I really want to work with JavaScript and not with python.
from pxt-filesystem.
Can confirm the same here... cannot use the web editor/JS - works in simulator but totally dead on board (no code runs at all). Good to know it's still possible via python though.
from pxt-filesystem.
Can confirm the same. Feedback from Micro:bit Foundation:
"I'm afraid the filesystem plugin does not work well with the updated MakeCode editor and that is why it is still in Beta. I would suggest you look at MicroPython for support doing this.
https://microbit-micropython.readthedocs.io/en/latest/filesystem.html"
from pxt-filesystem.
@Cybot101 How could I fix it then? So I don't use python, but stay with Javascript?
from pxt-filesystem.
@Cybot101 fork worked for me on the online makecode editor, offline (w10) did not work at first but worked after having it running through the online one first ... I know there are issues with compilation on w10 ... maybe is it related.
from pxt-filesystem.
Is there currently a setup of Operating System, browser, offline / online editor and firmware version to get this to function on a physical micro:bit? Or is this still strictly "simulator only"?
from pxt-filesystem.
Lacking a better place to add any documentation to get this working. Here are some instructions for adding the fork mentioned by @Cybot101 .
Adding Github Repository to Available Extensions
- Go to MakeCode
- Start a project
- From the setup cog, select
Extensions
- Scroll to the bottom until Want to create your own extension? Log in to GitHub
- follow process for generating a token
- paste the url for the fork
https://github.com/Cybot101/pxt-filesystem
- click on result to add
Notes
The intended functionality of having files appear visible when the micro:bit is connected via usb* is not present in the fork. Data can be streamed over Serial and then downloaded as a .csv
from there.
* Which is what I assume is the crux of this issue
Tested on:
OS | Browser | micro:bit Firmware Version |
---|---|---|
macOS Mojave 10.14.6 | Chrome | 253 |
Useful Links
from pxt-filesystem.
Related Issues (17)
- support for data files HOT 1
- File Download HOT 2
- Program Error: pxsim.files.createDirectory is not a function HOT 3
- Blocks no longer render in docs HOT 1
- File does not compile for download HOT 1
- Hex file does not compile in win10 app HOT 2
- W10 app: "read to serial" block from filesystem could result in a file in the 'serial viewer HOT 3
- File System package simulator error HOT 1
- Hex files with Filesystem extension crash on Microbit, works in simulator HOT 1
- Write setting data does not work
- Extension filesystem: filesystem/files.cpp(17): cannot determine value of Set = MB_SEEK_SET, filesystem/files.cpp(19): cannot determine value of Current = MB_SEEK_CUR, filesystem/files.cpp(21): cannot determine value of End = MB_SEEK_END
- Can't compile/download in PXT editor when filesystem library included HOT 1
- appendLine/appendString block names swapped HOT 1
- Corruption writing to file with accelerometer example HOT 4
- Need block for sequential file read HOT 2
- Need files.appendByte(255) for efficient storage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pxt-filesystem.