microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

Using 16x2LCD-Display only supports one line #1309

Closed MKleinSB closed 10 months ago

MKleinSB commented 1 year ago

Describe the bug In Simulator the text is shown in the second line too but not in reality.

Used Extension: https://github.com/1010Technologies/pxt-makerbit-lcd1602/tree/master/jacdac

grafik grafik

pelikhan commented 1 year ago

Strange, does this API support new lines? https://github.com/1010Technologies/pxt-makerbit-lcd1602/blob/master/jacdac/main.ts#LL54C26-L54C45

The message string is assembled at https://github.com/microsoft/pxt-jacdac/blob/master/character-screen/client.ts#L183 using \n​ as the new line character

Sent from Outlookhttp://aka.ms/weboutlook


From: Michael Klein @.> Sent: Wednesday, May 31, 2023 9:51 AM To: microsoft/jacdac @.> Cc: Subscribed @.***> Subject: [microsoft/jacdac] Using 16x2LCD-Display only supports one line (Issue #1309)

Describe the bug In Simulator the text is shown in the second line too but not in reality.

Used Extension: https://github.com/1010Technologies/pxt-makerbit-lcd1602/tree/master/jacdac

[grafik]https://user-images.githubusercontent.com/37311672/242345509-f84ad6cb-17d2-4c71-b719-2bdcf3652879.png [grafik]https://user-images.githubusercontent.com/37311672/242346106-655e9e25-3990-42ff-b650-58c5d41c1252.png

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/jacdac/issues/1309, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA73QKLOTVZLQ4LV4W23XSLXI5ZKTANCNFSM6AAAAAAYVXXSNI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MKleinSB commented 1 year ago

OK, thanks! That should be the reason. So the extension has to support newline.

RRWagner commented 1 year ago

Just a comment... in the actual MakerBit extension blocks for MakeCode, we don't use "0" for the LCD. Characters are 1-16 on line 1, and 17-32 on line 2. The use of "0" in arrays and in the LCD actually causes a lot of headaches and extra time in class for explaining what is not intuitive. Imagine, "Now students, to put the letter A at the 5th position, use 4". It "can" be explained, but a lot easier is, "Now students, put the letter A in the 5th position using 5", etc. For arrays, in actual classsroom work, we spent a lot of time trying to describe and fix bugs where students were struggling with the 5th element for example) being accessed with I=4. It all got much easier when we changed to 1-to-n counting schemes. just fyi