Comments (19)
@yjsoon Could you look into this one? It looks like the extension is still not supported fully on the V2 board
from pxt-rotary-encoder-ky040.
@firemansamm Any luck with updating the extension for micro:bit V2?
from pxt-rotary-encoder-ky040.
@microbit-pauline @microbit-sam Hi! Sorry it's been quiet - I'm no longer in charge of maintaining the packages, but I've attempted to push a branch that should work with the V2 if I understood the changes right. Would it be possible for someone to review this, as I don't have access to the V2 hardware? The branch in question is https://github.com/tinkertanker/pxt-rotary-encoder-ky040/tree/microbit-v2. cc: @yjsoon
from pxt-rotary-encoder-ky040.
@microbit-sam @microbit-mark I've made some updates to the extension that should now allow it to be compatible with the micro:bit v2 (released under v1.2.1), as tested locally and on the MakeCode editor linked to GitHub. I have also made the required pull request. May I verify if the extension works and if so, this issue has been resolved? Thank you!
from pxt-rotary-encoder-ky040.
HI
the link in the previous comment by raster is to my REPO, but the actual extension that i use is by a Michael klein,,, all credit must go to him!!
https://github.com/MKleinSB/pxt-KY-040
He is always very helpful if you have any questions
TTFN
from pxt-rotary-encoder-ky040.
Thanks @Mireille-T ONce the PR is approved you can close this ticket
from pxt-rotary-encoder-ky040.
@firemansamm - Are you able to look at this issue?
from pxt-rotary-encoder-ky040.
Any chance this will get updated? It's the only rotary encoder extension I can find.
from pxt-rotary-encoder-ky040.
I tried loading the extension from the new URL but it didn't seem to work, so I cloned the new version, got it loaded, but I get "Compilation failed, please check your code for errors." Though I'm not sure where exactly to check for errors.
Note: I probably did it wrong... Doesn't look like it loaded the new version. I'll keep trying.
from pxt-rotary-encoder-ky040.
@raster I wasn't sure if there was a way to add a branch to a project (which is why I tagged the foundation folks first). I've cloned and merged the changes to master on https://github.com/firemansamm/pxt-rotary-encoder-ky040 - try adding that repository instead? It should give you a warning about being a non-approved extension, but that's fine. If it works good, we can go ahead with merging it into this repository.
from pxt-rotary-encoder-ky040.
@firemansamm Thanks! Just gave it a try and it's not loading from the URL... I'll try tonight on another machine and give it another shot tomorrow if I still have issues.
from pxt-rotary-encoder-ky040.
I got the new URL loaded, tried to save the hex, and get the message "Compilation failed, please check your code for errors."
I did open the Explorer and try again and I got what you can see in this screen capture. I don't know if this means the error is in main.ts but thought I'd mention it.
from pxt-rotary-encoder-ky040.
Sorry! Found one more error...
from pxt-rotary-encoder-ky040.
@raster I've fixed it up to a state where it should compile (at least, it does let me download the hex). Can you make sure that the version within "Project Settings" > "Edit Settings As Text" is v1.1.1 from the new URL I've given earlier?
from pxt-rotary-encoder-ky040.
Okay, we've got v1.1.1 loaded. It does compile and I can load the hex onto a micro:bit V2, but the dial has no effect.
The switch seems to either do nothing, or sometimes seems to trigger on its own after the code is running for X amount of seconds. The behavior is inconsistent. (If I write separate code to account for the switch it does work, just not when using the event handler.)
Everything does work fine on micro:bit V1.5 board. Oh, one thing I forgot to mention... I assume left is counterclockwise and right is clockwise, if that is the case, the on rotated Left and on rotated Right event handlers are swapped, as left causes an increase and right causes a decrease. (Easy to work around, but thought I would mention it.)
Thanks again for trying to solve this! I'm happy to keep testing.
from pxt-rotary-encoder-ky040.
Just a quick update: I've been able to write code using blocks in MakeCode that can work with a rotary encoder, but the code is too simplistic, and only works if the dial turns slowly. Any pointers on how to make it work in MakeCode? Should I look at the on event handlers in the Control section?
from pxt-rotary-encoder-ky040.
Any chance of an update for this? I've looked at the code but just cannot figure out how to fix it.
from pxt-rotary-encoder-ky040.
I did find another extension that seems to work: https://github.com/dsssssssss9/ky40-test-klein-
from pxt-rotary-encoder-ky040.
Thanks to everyone working on solutions! We're trying to make more micro:bit content and curriculum available to teachers and students so this really helps. 👍
from pxt-rotary-encoder-ky040.
Related Issues (4)
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-rotary-encoder-ky040.