Skip to content

Commit

Permalink
webserial arduino analogRead error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
estea8968 committed Oct 16, 2021
1 parent 4fc3342 commit 25a6516
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="google" value="notranslate">
<link rel="shortcut icon" href="static/favicon.ico">
<title>OSEP_Code Editor 1101016</title>
<title>OSEP_Code Editor V1101016</title>

</head>
<body>
Expand Down
7 changes: 4 additions & 3 deletions app/lib.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -320207,9 +320207,10 @@ var Scratch3ArduinoWebSerial = /*#__PURE__*/function () {
switch (_context12.prev = _context12.next) {
case 0:
//送出pin並取回值
pin = args['PIN'].substring(1, 1);
pin = parseInt(pin, 10);
sendData = 'analogRead#' + pin.toString();
pin = args['PIN'].substr(1, 1); //pin = parseInt(pin, 10);

sendData = 'analogRead#' + pin + '#';
console.log(sendData);
this.serialSend(sendData);
return _context12.abrupt("return", this.serialRead());

Expand Down
2 changes: 1 addition & 1 deletion app/lib.min.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25a6516

Please sign in to comment.