LEGO Powered Up Tutorial | How to program a controller for a 2-motor train part 1

  Рет қаралды 18,289

Tegowalik

Tegowalik

Күн бұрын

####### Update #####
This tutorial is not really usable anymore since a major update of the Powered Up redesigned the UI. Instead, I recommend PyBricks as an alternative. For instance, see this video of ‪@BatteryPoweredBricks‬ for more details: • Using PyBricks to cont...
############################
This tutorial shows how to program a LEGO Powered Up controller for a LEGO City train having two motors facing into opposite directions. The controller includes a simple direct speed controller, a +- speed controller, a stop button, a speed lock, a speed display and a slow down button.
A second part shows how to add a LEGO Powered Up hand set controller to control the speed: www.youtube.com/watch?v=7e
Note that some icons inside the LEGO Powered Up App changed over time. But the basics shapes are still the same. Furthermore, the basic speed controller is kind of useless by now, since the speed does not go back to 0 by default, which disables the other features (unless you control the basic speed controller to 0 by your own). I would recommend to just leave out the basic speed controller.
- 00:00 intro
- 00:32 Build the 2 motors on the train
- 01:01 Create the project
- 01:18 The simple speed controller
- 02:37 The speed display
- 03:20 The speed lock/ cruise control
- 04:29 The +- speed controller
- 07:03 The stop button
- 08:01 The slow down button
- 10:38 controller presentation
- 11:35 Upgrade the train
- 11:48 Hardcore test

Пікірлер: 35
@casperhansen826
@casperhansen826 3 жыл бұрын
Drop the background music and explain what you are doing and why you are doing it, that would be much more helpfull for anyone.
@SA-rz6fj
@SA-rz6fj 2 жыл бұрын
Exactly this. Duhhhh
@user-sd2er6vw3x
@user-sd2er6vw3x 3 ай бұрын
Very helpful
@PuuberZ
@PuuberZ 2 жыл бұрын
Thanks for sharing this. I'm using 2 motors for my British diesel trains and this guide is wonderful. I kept mine simple but it's a lot better than using the tain controller and pushing 2 buttons at the same time.
@dmitriydemin4219
@dmitriydemin4219 2 жыл бұрын
Hello! Thank you so much for sharing this! I was so frustrated with the information on programming Powered Up being so limited. With the help of your video I managed to make a cool control profile for my custom monorail train. Can you please show how to make the same proportional control as you did for the motor, only for the lights?🙏. already spent all day and haven't got a slightest clue how to do it. Thank you in advance!
@Tegowalik
@Tegowalik 2 жыл бұрын
Yeah, LEGO did a really bad job developing and documenting the powered up app. Regarding your question: Basically you need the 2nd lowest part of the program for creating this proportional slow down of a variable (in the program of the video, this is "a"). Use the timer to control the slow down speed (in the video, the timer waits 0.1 until the next slow down step is done). If you want to have a slowdown independant of the motors, you need another variable (let's say "c") and another slow down component with variable "c" instead of "a". To make the light as bright as "c" use a loop which always sets "c" as input for your light (similar to the loop in the program at the top right). Of course, you still need to program something which sets "c" to some value (like 100 for the maximum brightness). I hope this makes it clearer. Actually I do not have any powered up light, so I can't test it myself
@dmitriydemin4219
@dmitriydemin4219 2 жыл бұрын
@@Tegowalik Thank you for your swift reply! What I ended up doing is basically copying the 2nd part of your programme, but this time with a new variable and not for the motor, but for the LEDs. Once again, it works like magic. My greatest debt of gratitude is to you for showing how to code the hub, otherwise I don’t know what I’d do. There aren’t many people out there who seem eager to share their progress with Powered Up, and Sariel & RacingBrick focus primarily on Technic hubs and motors, not these small ones. P. S. Do consider getting yourself the lights, I think the model looks more lively with them)
@Burgerboy6012
@Burgerboy6012 5 ай бұрын
What if I have a locomotive that uses two powered up hubs for two motors?
@AK.__
@AK.__ 2 жыл бұрын
Thank you very much, it looks cool! However, I can't understand the basics. I bought this 60197 set for my kid - does this set already has all this program and hardware, or I need to buy something? And most important - you show building this program on some screen, does the set has this "program-display", or where it is going on?
@Tegowalik
@Tegowalik 2 жыл бұрын
In addition to 60197 you need one more train motor (since only one motor is included in 60197) and a phone which runs the powered up app with the program shown in the video. Neither the powered up app nor the handset controller can control a train with two motors. The video presents a solution for this problem
@AK.__
@AK.__ 2 жыл бұрын
@@Tegowalik Thank you very much, appreciate your reply and clarification.
@w_avor
@w_avor 2 жыл бұрын
Why doesn’t the emergency stop button work?
@Le_Norman
@Le_Norman 8 ай бұрын
Hello can you show the programming in the latest version 4.0.3 because this programming does not work in the new version. thanks
@Tegowalik
@Tegowalik 8 ай бұрын
I am sorry, but I won't. This app is simply not well usable and I do not have any motivation to use it ever again. However, I can recommend a PyBricks version (github.com/Tegowalik/Pybricks-Train-Controller)
@dinhtuan752
@dinhtuan752 Ай бұрын
but the blocks have the same funtion eceapt for the look.
@STi_Studios
@STi_Studios 11 ай бұрын
Biult the whole thing for my ATSF train MOC and didn’t work at all. Kind of disappointed as I followed everything exactly and nothing worked. With the new update I cannot find anything on how to make a control system like this so I’ll have to use the remote instead until somebody makes a tutorial on the new update.
@STi_Studios
@STi_Studios 11 ай бұрын
I’m not saying that this doesn’t work I am just saying that I’d didn’t work for me. Please let me know if you have anything for ways to fix this.
@STi_Studios
@STi_Studios 11 ай бұрын
It’s still really awesome what you did though!
@Tegowalik
@Tegowalik 8 ай бұрын
Sorry for the late reply. Basically, I haven't used the LEGO Powered Up app since I created this video. It seemed to work for other viewers... however, if there was an update with major graphical changes, this tutorial might be useless now. I won't make an update video since, by now, a better option is available using PyBricks: github.com/Tegowalik/Pybricks-Train-Controller I hope this solution works for you ;)
@davideelettroriparazioni7147
@davideelettroriparazioni7147 2 жыл бұрын
Can you do for 1 motor
@Tegowalik
@Tegowalik 2 жыл бұрын
I won't do an extra video for this simple variation. Just change the current program at 2:10 of the tutorial such that you delete again the motor B part (the right motor block). Like this the program should work as intended
@Starlord3158
@Starlord3158 3 жыл бұрын
Does this work when using the controller as well
@Tegowalik
@Tegowalik 3 жыл бұрын
@scotty Williams It should be possible to adjust the program that the bluetooth remote controller can be used as velocity input. For that you need to use the remote controller block of the powered up app (orange section, totally right) for getting the input into the powered up program. Obviously the bluetooth remote controller must be connected to your phone as well as the bluetooth smart hub of the train. Note that you will still need the powered up app in order to control the train even if you change the velocity only by using the remote controller! As far as I know the LEGO powered up hardware can't run self created programs without app support
@Starlord3158
@Starlord3158 3 жыл бұрын
@@Tegowalik velocity input?
@Tegowalik
@Tegowalik 3 жыл бұрын
@scotty Williams velocity input in terms of: pressing a button of the bluetooth controller changes the speed/ velocity of the train.
@swisspumpkin4422
@swisspumpkin4422 3 жыл бұрын
Hi Scotty, did you succeed to run it by using the controller? Would you tell us how you did it? Best Greetings from Switzerland!
@swisspumpkin4422
@swisspumpkin4422 3 жыл бұрын
@@Tegowalik Puhhh not easy to write a program that uses the bluetooth remote controller. It was much easier in the 80s with 12V: just push two motors together :-)
@Bobrikaz
@Bobrikaz Жыл бұрын
This guy is German and uses Samsung, don't ask me how I found out ;D
@kodebruin4701
@kodebruin4701 11 ай бұрын
How did you make the attachment with the code -100
@Tegowalik
@Tegowalik 11 ай бұрын
Everything has been programmed using the Powered Up App. However, the design and functionality of the Powered Up App may be changed since releasing this video. Probably that's the problem. I highly recommend using this implementation github.com/Tegowalik/Pybricks-Train-Controller. This does not require the Powered Up App and the Handset Controller can be used as with a single motor
@Tegowalik
@Tegowalik 2 жыл бұрын
Also see github.com/Tegowalik/Pybricks-Train-Controller. This version basically realizes the same functionality but with a handset controller instead of the powered up app
Dual Motor Lego Locomotives 9v, PF and PU
19:12
BatteryPoweredBricks
Рет қаралды 7 М.
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
HOW DID HE WIN? 😱
00:33
Topper Guild
Рет қаралды 30 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 7 МЛН
Don't install this Powered Up update! Call LEGO instead...
5:49
RacingBrick
Рет қаралды 23 М.
solving the LEGO city train problem (no room for loops!)
9:31
eggybricks
Рет қаралды 302 М.
Can you run two LEGO Powered Up Train Motors together?
11:15
GJBricks
Рет қаралды 26 М.
Lego Powered Up/ Control+/ Boost Tutorial #01: One App to rule them all [English|HD]
7:32
Technicmaster0 Tutorials and more
Рет қаралды 8 М.
Double the Power - Modifying the LEGO Orient Express Train
9:40
Danjo Trains
Рет қаралды 21 М.
Lego train 7740 upgrade to powered up - tutorial
11:10
bricks-builds
Рет қаралды 10 М.
LEGO City Train Modified with Jacobs bogies Tutorial (60197)
13:17
Arduino for Lego Trains #12: Onboard Arduino for Power Functions
10:06
Arduino Lego Trains
Рет қаралды 47 М.
1❤️ #shorts
0:24
Saito
Рет қаралды 60 МЛН
#Kritikachannel#Shorts video 🙏🙏🙏
1:00
Kritika Channel
Рет қаралды 57 МЛН
😆 @SantiOficialll @SantiFansshort @CAMILOAGUILLONN
0:15
Santi
Рет қаралды 7 МЛН
Pringles chips 😱🤣 #demariki
0:25
Demariki
Рет қаралды 3,1 МЛН
谁能救救小宇宙?#火影忍者 #佐助 #家庭
0:43
火影忍者一家
Рет қаралды 3 МЛН