microsoft / pxt

Microsoft MakeCode (PXT - Programming eXperience Toolkit)
https://makecode.com
MIT License
2.06k stars 570 forks source link

serial blocks are hidden in adfruit and maker #4040

Open machinehistories opened 6 years ago

machinehistories commented 6 years ago

In the adafruit circuit playground and in the maker tool the serial blocks are hidden. You can access the functions in java and you can see the serial blocks listed properly in the support documents for these two apps. I've tried the windows 10 adafruit app and it has the same missing serial blocks issue running the app locally as it does running it on in a browser on the web. Also may I ask how to use the webusb. I saw mention of it and it sounds exciting. It will be way easier for students to upload using a direct usb connection. Keep up all the exciting work. The serial blocks are still available in microbit.

abchatra commented 6 years ago

Serial blocks are renamed to console as they are more student friendly and should work on windows app.

image

abchatra commented 6 years ago

Webusb is still in experimental phase and questions are mostly related to security and usability of the prompts. Also webusb is not a web standard and still a proposal for W3C.

machinehistories commented 6 years ago

Does this mean the missing serial blocks are still being moved to the console tab. What about write number, write line, read line, read line until, read string, serial redirect, etc. I would hate to see all of those blocks go away. It will really impact the functionality of working with serial data using blocks.

On Mon, Apr 2, 2018 at 4:38 PM, Abhijith Chatra notifications@github.com wrote:

Serial blocks are renamed to console as they are more student friendly and should work on windows app.

[image: image] https://user-images.githubusercontent.com/6107272/38221397-27bc70ba-3694-11e8-8cf7-bb7ec3cf0c27.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/pxt/issues/4040#issuecomment-378081758, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlqVCHQDiH_pogUUgisyCMCnm5jFBD1ks5tkrZwgaJpZM4TCq5z .

abchatra commented 6 years ago

write number: We are going to fix console.log to accept numbers as well. So one doesn't need a new block. Today you can use the join block in text category to do that. write line: this is same as console.log

We don't have plan for the following. Why do you need them? Can you let us know the user scenario? read line, read line until, read string, serial redirect,

machinehistories commented 6 years ago

That is really good that numbers will also be accepted. The reason for read line, read line until, read string, serial redirect, is to interact with other application such as grasshopper3d https://www.youtube.com/watch?v=_E1NO4mJUgg or processing https://www.youtube.com/watch?v=7iMMUO0J3h4 or other apps that communicate via serial. You can send values via serial to control geometry in those apps and then use serial read to change a color of an led or play a song for example on the circuit playground express based on the incoming message. You need redirect since you can only access one com port at a time. Also another really important reason is in the maker app if you want to have pass through serial using wifi module such as esp8266 or bluetooth added onto the board in order to interact with a tablet via serial you currently can't do it. I've noticed all sorts of IOT add ons for the microbit such as https://github.com/DFRobot/pxt-Obloq, http://muselab.cc/product/muselab-wifi-iot-shield-for-microbit/, http://www.instructables.com/id/Use-HC-06-Bluetooth-Module-to-Realize-Microbit-Com/ , https://www.elecfreaks.com/12224.html. To not be able to use similar hardware on the maker app would be so unfortunate. All that is needed for any of those particular hardwares to work is an rx,tx,3v,gnd and a serial port defined. The maker app already has many sophisticated features not available on the microbit such as expanded math functions so it can do some advanced stuff and it doesn't seem like it should be so oversimplified that you limit functionality by privileging over simplicity. You just have to have serial it's at the heart of how all microprocessors work I am begging you guys to make sure to include those blocks. On this page https://makecode.adafruit.com/reference/serial it also clearly states that The Adafruit Circuit Playground Express can read data from and write data to another computer or device with a serial connection using USB. I think it's important to have it able to do just that. When I first saw the maker app I was so excited because I thought this is going to be even better than the microbit app as a learning platform and it will enable all sorts of things to be made with an even greater depth of exploration. Because of the breadboard interface it encourages exploring and interacting with all sorts of hardware but most of the hardware is often controlled with serial messages. I think you guys are doing great work but please enable serial.

On Tue, Apr 3, 2018 at 9:30 AM, Abhijith Chatra notifications@github.com wrote:

write number: We are going to fix console.log to accept numbers as well. So one doesn't need a new block. Today you can use the join block in text category to do that. Write line write line: this is same as console.log

We don't have plan for the following. Why do you need them? Can you let us know the user scenario? read line, read line until, read string, serial redirect,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/pxt/issues/4040#issuecomment-378312053, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlqVPrUleGPAcj2mSufGKOdg55hjMY6ks5tk6OJgaJpZM4TCq5z .

abchatra commented 6 years ago

Thanks for the feedback @machinehistories

Are you asking for serial through pins or serial through USB?

machinehistories commented 6 years ago

Pins would be ideal for interfacing with hardware and other apps but serial over usb could at least work with interfacing with other apps and or terminal programs. thanks

On Tue, Apr 3, 2018 at 2:05 PM, Abhijith Chatra notifications@github.com wrote:

Thanks for the feedback @machinehistories https://github.com/machinehistories

Are you asking for serial through pins or serial through USB?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/pxt/issues/4040#issuecomment-378399101, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlqVCnnui4OQoKqj8xstOb4O07AyUzWks5tk-QogaJpZM4TCq5z .

abchatra commented 6 years ago

Thanks! Note I will mark this as feature request. Reason is the serial over USB is not implemented in CODAL runtime and will need work to be enabled. It is not just enabling these blocks.

abchatra commented 6 years ago

Feature requests in this bug: USB over serial (CODAL + blocks) USB over pins (blocks)

machinehistories commented 6 years ago

Amazing and thanks I look forward to using it and keep up the great work

On Tue, Apr 3, 2018 at 3:02 PM, Abhijith Chatra notifications@github.com wrote:

Feature requests in this bug: USB over serial (CODAL + blocks) USB over pins (blocks)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/pxt/issues/4040#issuecomment-378413708, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlqVOmyoRtF3Cu5MNimXFoOMBVDUqmeks5tk_FYgaJpZM4TCq5z .