Hi @dsssssssss9 ,
Glad you were able to get it to work. I don’t think blocks include all the parts needed, but writing an extension would allow you to provide code in JavaScript and use it from blocks.
I’m not aware of any truly ideal, up-to-date tutorials on extensions, but some resources I’ve used in the past include:
- GitHub for Extensions
- Custom blocks
- Look at the GtiHub repos for any extensions that are comparable.
- Previous post here: Any help or guidance in making my own code blocks for a motor hat - #2 by bsiever (A little redundant with the above)
- MakeCode Blocks Playground for testing the shape/structure of blocks.
- You can join the Slack for the developer community at https://tech.microbit.org/community/ (It has very little traffic though)
I hope that helps a bit!