Hot answers tagged

5

You can get community support for Pybricks at https://github.com/pybricks/support. ir.buttons(1) returns a list of pressed buttons, so in this particular program if ir.buttons(1) == Button.BEACON: needs to be changed to if Button.BEACON in ir.buttons(1): This will test if item is in list.


4

Works for me if you set buffering to 0 and get rid of the newlines. import time # command to start motor on port A at speed 20 start_motor = '\x0C\x00\x00\x00\x80\x00\x00\xA4\x00\x01\x14\xA6\x00\x01' # command to stop motor on port A stop_motor = '\x09\x00\x01\x00\x80\x00\x00\xA3\x00\x01\x00' # send commands to EV3 via bluetooth with open('/dev/tty.EV3-...


3

If you are running ev3dev on the EV3, you can use RPyC to remotely execute Python code on the EV3. Resources: Python-ev3dev. Working with ev3dev remotely using RPyC EV3 PYthon. RPyC


3

You can create a network connection between two EV3s using USB + ev3dev. Just enable tethering (the "Gadget" checkbox) on one of the EV3s. Connect the USB cable to the USB peripheral port on that brick (the small port next to the output ports) and the host port on the other EV3 (the USB port on the side of the brick). Then, you could use something like RPyC ...


2

ev3dev works pretty well for that purpose, and all you need is a microSD card. You'll need to use the Motor class. It work with both large and medium motors, and either can be use to shoot balls, so this part will be at your preference.


2

I've had great success with Bricx Command Center or BricxCC (as mentioned in this post) on my NXT using NXC (which is easy to pick-up when you already have a C/C++ foundation like you've mentioned). Installation, using the supplied drivers and connecting via USB is a breeze :) Hope this helps!


2

What you're trying to accomplish is called Odometry, and fortunately it's a pretty common task in robotics so there's a lot of information available on how to do it. The short answer is, it's relatively easy to implement, but hard to make it work really well. Let's make things simpler by deciding that the robot can only a) drive straight and b) turn 90 ...


1

I don't think an .rbf file is ever generated, the microPython engine installed on the flash disk interprets and executes the .py file directly. .rbf files were executable files generated by the EV3 software, i.e. either the graphic programming language in the old version (with blocks you needed to draw) or the scratch based new software. I think you should ...


1

That is just the default state of the light when pybricks-micropython starts. You can get help with Pybricks programming at https://github.com/pybricks/support.


1

This isn't exactly sending direct commands to your robot, but LEGO Education recently released a python stack for the EV3 brick. I haven't tried it; but as I understand it, it's an alternative firmware which should allow you to have python scripts running natively on your EV3 brick, allowing for full autonomous robots programmed in python.


1

It's definitely possible and feasible to communicate from a program on your PC through bluetooth with an EV3 brick, several example projects can be found on the internet. Assuming you want to code Python on your PC, I found this link: http://ev3directcommands.blogspot.com/2016/01/no-title-specified-page-table-border_94.html


1

In my experience, most 3rd-party firmware can be flashed to the NXT brick using the standard NXT-G software "Firmware Update Tool." As others have mentioned, BricxCC with NXC is also a great option. And if you're having trouble with the Python implementation, it's definitely worth checking out LeJOS (Java for Mindstorms). While Java may not be the usual ...


1

I figured it out :-) Using pi.set_PWM_dutycycle(c1, 128) # PWM 1/2 on makes it move. In hindsight kinda obvious :)


1

I have not tried this for myself. But as far as I know ev3dev does not support EV3 USB daisy chaining. EV3 serial to EV3 serial over sensor ports should work. e.g. as an example https://github.com/ev3dev/ev3dev/issues/346 and https://github.com/ev3dev/ev3dev/issues/695 Make your own cable with a wire for ground, and cross-over wires for TX and RX.


Only top voted, non community-wiki answers of a minimum length are eligible