Giter Site home page Giter Site logo

dfrobot / pxt-maqueen Goto Github PK

View Code? Open in Web Editor NEW
42.0 21.0 101.0 320 KB

Maqueen is an easy-to-use programming educational Robot

Home Page: https://dfrobot.github.io/pxt-maqueen/

License: MIT License

Makefile 0.17% C++ 74.03% TypeScript 25.81%

pxt-maqueen's Introduction

Maqueen

Maqueen is an easy-to-use programming educational Robot

Basic usage

  • Set the direction and speed of Maqueen motor
 maqueen.motorRun(maqueen.Motors.M1, maqueen.Dir.CW, 120)
 maqueen.motorRun(maqueen.Motors.M2, maqueen.Dir.CCW, 120)
  • Read ultrasonic sensor
basic.showNumber(maqueen.Ultrasonic(PingUnit.Centimeters))
  • Set the Maqueen servos
maqueen.servoRun(maqueen.Servos.S1, 90)
  • Stop the Maqueen motor
maqueen.motorStop(maqueen.Motors.M1)
  • Read line tracking sensor
serial.writeNumber(maqueen.readPatrol(maqueen.Patrol.PatrolLeft))
  • Turn on/off the LEDs
maqueen.writeLED(maqueen.LED.LEDLeft, maqueen.LEDswitch.turnOn)
  • Read IR sensor value
basic.showNumber(maqueen.IR_read())
  • Read the version number
basic.showString(maqueen.IR_read_version())

License

MIT

Copyright (c) 2018, microbit/micropython Chinese community

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)

pxt-maqueen's People

Contributors

albjeremias avatar gustavvvo2 avatar izikeros avatar jhlucky avatar kazuchikanakagawa avatar mao172 avatar mnh-jansson avatar mquinson avatar mserranosu avatar muucha avatar nenahov avatar nsteinmetz avatar onionstack avatar ouki-wang avatar shogenji avatar t-sa-sa-ki avatar tangjie133 avatar tchoun avatar wxzed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pxt-maqueen's Issues

Motor doesn't work with Maqueen V3 and V4

Motor doesn't work with micro:Maqueen V3 and V4 on microbit V1.38.

Example:
basic.forever(function () {
maqueen.motorRun(maqueen.Motors.M1, maqueen.Dir.CW, 255)
})

Bug, On Bloq Received loop

guys i have noticed if you want to pull (on block received loop) into the programing it hangs all the browser (firefox and crhome latest versions). and you cant continue editing or adding any block.

as a workaround i had to switch to JavaScript interface and roll back

this is the funcitons that has problems:

maqueen.IR_callbackUser(function ({ myparam: message }) {})

i hope you can fix this its a big problem for newbies.

Dutch Translation

Hi there,
Instead of forking and keep it to myself, I'd like to apply for making the Dutch translations for this library. Please let me know if you're interested.

Greetings,
Coen

After doing pxt staticpkg shows "Compilation failed,please check your code for error"

I follow the instructions with "Local server setup" section on https://github.com/microsoft/pxt-microbit using windows 10,

(1)Install Node.js 8.9.4
follows the steps on https://makecode.com/cli to install
Yotta SRecord 1.64 Visual Studio
mkdir d:\makecode
cd d:\makecode
(2)git clone https://github.com/microsoft/pxt-microbit
(3)cd pxt-microbit
(4)npm install -g pxt
(5)npm install
(6)cd libs
git clone https://github.com/DFRobot/pxt-maqueen.git
rename pxt-maquee to maquee
cd maqueen
npm install
edit d:\makecode\pxtarget.json

add "libs/maqueen" to bundleddirs shows as below

"bundleddirs": [
"libs/core",
"libs/radio",
"libs/maqueen", <--- add this
"libs/devices",
"libs/bluetooth",
"libs/servo",
"libs/radio-broadcast",
"libs/microphone"
],

(7)d:\makecode\pxt-microbit\pxt staticpkg

 target: v2.3.62 D:\makecode\pxt-microbit 
 pxt-core: v5.37.74 D:\makecode\pxt-microbit\node_modules\pxt-core
 packaging editor to built/packaged
 log strings: 31 files; 9 strings -> sim-strings.json
 copying common-sim...
 error TS1109: Expression expected.
 error TS1005: ':' expected.
 building compiler...
 [run] cd compiler; node ../node_modules/typescript/bin/tsc
 building target.json in D:\makecode\pxt-microbit...
 building D:\makecode\pxt-microbit\libs\core
 building D:\makecode\pxt-microbit\libs\maqueen
 building D:\makecode\pxt-microbit\libs\radio     
 building D:\makecode\pxt-microbit\libs\devices
 building D:\makecode\pxt-microbit\libs\bluetooth
 building D:\makecode\pxt-microbit\libs\servo
 building D:\makecode\pxt-microbit\libs\radio-broadcast
 :
 :
 :
 All docs written from docs.
 All docs written.

(8)D:\makecode\pxt-microbit>http-server -S -C c:\cert.pem -K c:\key.pem -p 443 -c-1 built/packaged
(9) go to chrome and open the URL with https://192.168.1.21
(10)drop down green wheel --> extensions --> Maqueen
(11)drag a maqueen blocky to the editor
(12)click "Download" the show the message "Compilation failed,please check your code for error"

would you please advise me any correction to operate normal download HEX file to Microbit

ultrasonic with microbit v2

I have some issue with the block blockId=ultrasonic_sensor block="read ultrasonic sensor...

It works with v1 but with microbit version 2, i have lot of 0 return value.

Regards,

On IR Received error :( 020

I am trying to read an IR signal but it always generates an error. I am using maqueen 1.5.6 in makecode.microbit.org.
I have kept the test simple with the JS below:
maqueen.IR_callbackUser(function (message) { basic.showLeds(
. . . . .
. . . . #
. . . # .
# . # . .
. # . . .
) }) basic.showLeds(
. # # # .
# . # . #
# . # # #
# . . . #
. # # # .
)

Should this be working or am I missing some initialisation?

in MakeCode. extension maqueen is not compatible with extension bluetooth

If project includes both bluetooth and maqeen extensions, program doesn't work properly on real micro:,bit.

Examples:

  1. following program does not work

maqueen.motorRun(maqueen.Motors.All, maqueen.Dir.CW, 128)
basic.pause(5000)
maqueen.motorStop(maqueen.Motors.All)

  1. following program shows in cycle 0, 2 and "sad" icon on display:

bluetooth.startUartService()
basic.showIcon(IconNames.Heart)

It should be fixed, or, at least, documented

1.2.1 fails to load into makecode

Hello,

Each time I try to load the maqueen (v 1.2.1) extension into makecode, I have:

SyntaxError: JSON.parse: expected double-quoted property name at line 25 column 1 of the JSON data
2 pxtapp.js:9159:26

On OSX, whatever the browser (safari, chrome or firefox)

Russian translation

Please create a new tag (v1.3.2) in your project (for Russian locale).
MakeCode doesn't see the latest changes without switching the tag (release).

Expansion not working?

The maqueen expansion has been working perfectly with makecode until last friday. Now it does not seem to load and be able to open new projects with it. My students have the same problem. Anyone know of a fix?

Norwegian science teacher

Can more HW features be included in MakeCode?

We would like to access all of the hardware features such as speaker and RGB0-3 in the Maqueen extension. Or is there any documentation available on how to address them using micro:bit pins?

Ultrasonic Error

The Ultrasonic no longer works. It only returns a value of 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.