David Lechner

Eurobricks Vassals
  • Content Count

  • Joined

  • Last visited


About David Lechner

Spam Prevention

  • What is favorite LEGO theme? (we need this info to prevent spam)
  • Which LEGO set did you recently purchase or build?

Profile Information

  • Gender


  • Country

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. David Lechner

    iPad vs Mac for programming Mindstorms EV3

    In spring 2020, LEGO should be releasing an iOS version of their new Scratch-based programming app. This app is somewhere between the current iOS app and the desktop app in terms of capabilities (e.g. you can get sensor values and do math). The Scratch-based app is currently only available for macOS, but LEGO has announced that support more OSes are coming.
  2. C1 and C2 are also 9V (battery voltage). On non-servo motors, C1 and C2 actually power the motor and the 9V and GND lines are not connected.
  3. David Lechner

    Color and Distance Sensor

    The protocol is nearly identical to EV3 UART sensors. It just has a few extra info packets that it sends. So this would probably be a good starting place: https://lejosnews.wordpress.com/2014/06/03/arduino-uart-sensors/
  4. David Lechner


    The pythonic way to do this would be: r, g, b = color_sensor.rgb() It can also be written as (r, g, b) = color_sensor.rgb() This is called "tuple unpacking".
  5. David Lechner

    LEGO Education EV3 MicroPython

    Since it is based on ev3dev, all of the stuff you mentioned is possible (except maybe RCX sensors). But it probably isn't easy to figure out. The documentation only mentions the stuff that works really well and is easy to use.
  6. On Friday, LEGO Education released a new solution for programming LEGO MINDSTORMS EV3 with MicroPython. https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3 It is based on the ev3dev operating system and includes a new MicroPython library for writing programs. Check it out and I'll try to answer questions if I can.
  7. David Lechner

    EV3 Firmware 1.04 and 1.05

    Maybe not exactly what you are looking for, but there is an unofficial 1.05M version available on the MindCuber web page (the download link in section 2.1). http://mindcuber.com/mindcub3r/mindcub3r-orig.html This version should be the same as the official 1.05 version with a fix for the RGB mode of the color sensor.
  8. David Lechner

    Boost Color and Distance Sensor readings

    I think we would need a high-speed camera to guess what the sensor is doing in this mode (to measure how long the LED is on or off and which color). I'm afraid I don't have any better guesses to answer your questions. Which programming language will you be using? I think using two colors to encode information would work well. If the color sensor can read 10 colors, this gives you 10 * 9 = 90 combinations. Perhaps a bit fewer if the color sensor has trouble with some colors (in certain lighting conditions) like the EV3 color sensor.
  9. David Lechner

    Boost Color and Distance Sensor readings

    Try this: 08 00 45 <PORT> <COLOR CODE> <DISTANCE> <LED COLOR> <REFLECTED LIGHT>. <COLOR CODE> is a value 0 to 10, same as mode 0 <DISTANCE> is a value 0 to 10, same as mode 1; there are no units of measurement here since using IR to measure distance is not that accurate <LED COLOR> is a value 0 to 10, same as mode 5; this value is write-only, so reading it returns -1; only red/green/blue (9/5/3) are valid values for setting the LED color, anything else will turn off the LED <REFLECTED LIGHT> is a value 0 to 100, same as mode 3 Basically, this mode (8) looks like a way to read multiple values more efficiently than using each mode individually. Because of this, the color of the LED in this mode is not as "pure" as other modes (and "off" is not completely off) since it is constantly switching modes. When writing to the sensor using this mode, you still need to specify the 4 data values. Only the 3rd one <LED COLOR> is actually used. The others are ignored (so just set them to 0).
  10. This is a matter of opinion, but `sudo pip3 install ...` is a good way to break things. Eventually, you will install a package that breaks something else that is used by the system. It is probably not so much a problem on ev3dev since there isn't much, if anything, installed by default that can be broken this way. But I think it is better to not get into this habit in the first place. (I learned this the hard way with my desktop.) Since ev3dev is based on Debian, most popular Python packages are already available as Debian packages. So, `sudo apt update && sudo apt install python3-requests` would install the Debian version of this library. This is also really good for Python packages that include a binary component. The Debian package will contain a pre-compiled binary whereas compiling on a RPi can be tricky to install all of the correct dependencies and the EV3 has the same issues plus it is 10x slower. If there is a Python package you want to install that does not already have a Debian package, then it is still better to install it with pip3 as a user package rather than installing it system-wide. To do this, just don't put `sudo` in front of `pip3`. Then packages will be installed to the local user directory `~/.local/lib/python3.5/site-packages/` instead of the system-wide python packages directory.