by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 07 19:54
    JakubVanek commented #1401
  • Aug 07 19:53
    JakubVanek commented #1401
  • Aug 07 19:51
    JakubVanek commented #1401
  • Aug 07 19:12
    JakubVanek commented #1401
  • Aug 06 07:59
    bluemoon-123 opened #1432
  • Aug 05 15:51
    dlech commented #1431
  • Aug 05 14:47
    Khhs167 labeled #1431
  • Aug 05 14:47
    Khhs167 opened #1431
  • Aug 02 23:38
    JakubVanek commented #1401
  • Aug 02 23:38
    JakubVanek commented #1401
  • Aug 02 23:07
    JakubVanek commented #1401
  • Aug 02 19:59
    JakubVanek commented #1386
  • Aug 02 14:16
    JakubVanek commented #1386
  • Aug 02 14:12
    JakubVanek commented #1386
  • Aug 02 14:00
    JakubVanek commented #1386
  • Aug 02 10:54
    jankow86 commented #1321
  • Aug 01 12:36
    mzajkaniha opened #1430
  • Aug 01 12:36
    mzajkaniha labeled #1430
  • Jul 31 16:08
    dlech commented #428
  • Jul 31 16:08

    dlech on master

    Fixed broken link (#428) (compare)

David Lechner
@dlech
with the EV3 connected to the internet
Benjamin Hill
@salamanders
noob question: I'm trying to interface directly through read/writes to the file system. I got an motor running (yay!) like a lightweight EV3LargeRegulatedMotor. Now I'm trying to get an EV3 Ultrasonic Sensor running, but I'm not sure of the "startup" sequence. I think I have to write the right device to the right port...
David Lechner
@dlech
If you are using EV3, then EV3 sensors (and some NXT sensors) are automatically detected
Benjamin Hill
@salamanders
Ah, good point. BrickPi3
David Lechner
@dlech
Yeah, BrickPi3 needs to set the port to ev3-uart mode then write the driver name to set_device
Benjamin Hill
@salamanders
I think I was missing that first step
Oh and random follow-up question. For stuff like "state" I noticed virtual file system updates the contents of the file, but not the modified date or size. Which makes me doubt I can use Java's WatchService to know when the state or speed changes. But I'm not sure. And if it would be better than rapid-polling the file, I'm all for a better way!
David Lechner
@dlech
for tacho-motor state, you can poll() the file to be notified of changes
Benjamin Hill
@salamanders
I will try both these. Thank you again!
David Lechner
@dlech
not sure if that is the same kind of poll
Benjamin Hill
@salamanders
ohh. huh. I'll try the java one see if it works
Benjamin Hill
@salamanders
Reporting back: nope, https://docs.oracle.com/javase/tutorial/essential/io/notification.html does not notice when a motor's "position" file changes.
David Lechner
@dlech
@salamanders only the state attribute on tacho-motor class can be polled, nothing else
Loucas Louka
@QMPZ_gitlab
Does anyone know how to overclock my EV3 medium servo motors (increase their voltage)? I am currently using micropython and ev3dev. I want to know if a command exists for this purpose, so I can use it in the Visual-Studio-Code (SSH Terminal).
Curtis Bates
@falenn
@dlech Do you have an example of DriveBase.drive(...) with PID controller?
Thanks!
David Lechner
@dlech
I don't think we have any DriveBase examples yet.
What are you trying to control?
Curtis Bates
@falenn
Ahh so, PID control is only for motor control, not DriveBase
just driving standard tricycle robot for line following
I have the basic P controller example from github
David Lechner
@dlech
The drive base uses the same PID control as motors
Curtis Bates
@falenn
So, I can use it with DriveBase
David Lechner
@dlech
you can use DriveBase.drive() in a loop and update the speed and angle
then you just have to come up with a function to convert the sensor value to a speed and angle
and it does the rest to adjust the speed of the motors
Curtis Bates
@falenn
and so that function is making successive calls to the pid function off of DriveBase.heading_control.pid(...)?
David Lechner
@dlech
It doesn't call that method, but it is constantly updating the target of heading_control
Curtis Bates
@falenn
the target_tolerances(..
David Lechner
@dlech
nope, that is only for maneuvers that have a final target. drive() runs forever and doesn't stop
Curtis Bates
@falenn
oh, right. I understand now
thanks!
thesantena
@thesantena
Hi. How can I do this action on evdev2? Thank you
Fadleen Sidek
@fadleensidek
@KWSmit Hello, are there any sample codes or programs to start things off for PiStorms? Not sure what proper steps or settings to make a simple motor move on BAM1.
https://i.imgur.com/HKZBFfD.jpg
Kees Smit
@KWSmit
Have a look at https://github.com/KWSmit/KSmEV3TicTacToe--PiStorms-version-, I think this will help you...
Fadleen Sidek
@fadleensidek

@KWSmit Cool project! And thank you for your code, i am able to do a simple Motor sanity check. I understand why i got that Device Not Connected or not found error. I was trying to step into the code and there is no device "simulator" sort of environment or library on the VS Code. How do you usually do debugging? print() statements or any special configs to step through the code in real-time?

https://i.imgur.com/cYp6eAp.jpg

Kees Smit
@KWSmit
@fadleensidek Just logging and sometimes the interactive terminal is handy (https://www.ev3dev.org/news/2020/02/13/ev3dev-vscode-extension-beta/).
Kees Smit
@KWSmit
And with RPi you can also do remote bugging from VS Code (https://code.visualstudio.com/docs/remote/ssh). Haven’t used it myself yet, though...
Olivier Martin
@omartin2010
I can confirm, @KWSmit and @fadleensidek that remote debugging from vscode works beautifully on the RPI. I use it all the time... and even in containers which is kind of nice but trickier to install. There is even for simplicity this thing called codespaces which is a vscode server running on the RPI. That part I've not tried it. It's a bit more involved because it requires access to the internet from the pi, and Azure credentials, so it might not be the easiest thing to do. But it behaves more or less the same as vscode remote.
Fadleen Sidek
@fadleensidek
@omartin2010 and @KWSmit yes, i would like a more "typical" sort of debugging where i can put breakpoints and watches. Debugging using logging and print are just too troublesome imho. The interactive terminal is useful for stack traces too as mentioned by Kees. Not really sure why the mtr.motor.wait_until_not_moving() function is not a blocking function when in the docs it says it is..Maybe i am missing something. No wonder Kees implemented his own wait function in his project calledwait_while_motors_running(). Since i just got my PiStorms a couple of days back, still got a lot of reading and trying to do.. I will read up the remote debugging technique as mentioned by @KWSmit and @omartin2010 . thank you.
Kees Smit
@KWSmit
@fadleensidek you’re right that the wait-functions don’t work on the PiStorms. I believe it has something to do with the PiStorms firmware. Maybe @dlech can elaborate more on this. You’ll also find out that the motors show a kind of ‘jittering’ behaviour, especially with hold and brake. This are the only two disadvantages of PiStorms.
Fadleen Sidek
@fadleensidek
@omartin2010 managed to get the remote ssh debug working.. yes, it is indeed working beautifully and painless to debug..
Fadleen Sidek
@fadleensidek

@KWSmit have not explored too much of the APIs but since i am able to do remote debugging now, things can proceed better. Probably will need to wait until the weekend to find the time to play around further. wait_while_motors_running, the wait functions and the stop actions such as hold and brake are working fine in the EV3 block? I only have the PiStorms. Btw, I tried using the motor.is_running flag to implement a custom wait.. Seems like the flag will need at least 4 to 5 ms "response time" to toggle but it can be a hit or a miss at those timings. 10ms is much safer.

https://i.imgur.com/inItbMX.jpg

Coach Jeff
@1pYDca4d5TUYfb
I'm trying out ev3dev java, but I'm having trouble with tests of the gyro sensor. On the LCD screen when watching the values, the angle gets reported correctly in both the positive and negative direction. But when I run any of the three gyro demos (with logging of the gyro values) only positive values are being logged. Any negative values get logged as 0. I'm using the this [demo] (https://github.com/ev3dev-lang-java/examples/blob/master/ev3dev-lang-java/src/main/java/ev3dev/sensors/ev3/GyroSensorDemo3.java) can anyone help me understand why I'm not getting negative values from the gyro sensor?
Curtis Bates
@falenn
Well, I know this is probably the wrong forum, but I just found out that Ev3G for Mac is EOL (being only 32-bit). Does anyone know the future of the EV3 Home Edition? @dlech thanks for the help over the last month. I was able to teach a class to rising high school students using MicroPython and VSCode. I introduced them to a number of concepts, including ... Python, networking (wifi for all the robots), ssh, Linux and VSCode. Pretty cool time.
David Lechner
@dlech
nice
there is a new scratch-based programming software for macOS from LEGO