Пікірлер
@VeryUsMumblings
@VeryUsMumblings 7 күн бұрын
Nice Solution. Mine was much more complicated. 👍 I did a partial solution and then had to go back and fix it!
@jameslewellen150
@jameslewellen150 6 күн бұрын
My solution was a little flaky, sometimes the red and the yellow would switch positions randomly. Hope Paul's solution fixes that problem. This PIO State Machine is pretty hard to fathom.
@VeryUsMumblings
@VeryUsMumblings 6 күн бұрын
@@jameslewellen150 Absolutely! And the documentation is hard to read, too! my solution needs major button de-bouncing but there isn't anymore memory for nops 👍
@paulmcwhorter
@paulmcwhorter 7 күн бұрын
Nice work!
@paulmcwhorter
@paulmcwhorter 7 күн бұрын
OK, this is a very nice solution, and different than how I did it. The assignment was actually a fairly tough one, and you came up with a very nice solution.
@alistaircook1997
@alistaircook1997 8 күн бұрын
I like your solution to this weeks homework, well done. First time I found your youtube channel
@VeryUsMumblings
@VeryUsMumblings 8 күн бұрын
Good Stuff! 👍
@arnoldschmucker9977
@arnoldschmucker9977 9 күн бұрын
Nice!
@jameslewellen150
@jameslewellen150 8 күн бұрын
Thanks
@leeg.1402
@leeg.1402 9 күн бұрын
Nice video. I like the nice big breadboard too. I need to get one. Regards, Lee
@jameslewellen150
@jameslewellen150 8 күн бұрын
Thanks, I also like the that breadboard. The only problem with it is the orientation of contacts. I had to make adapter boards to keep the displays in the proper orientation.
@keithlohmeyer
@keithlohmeyer 23 күн бұрын
Nice job.
@placeholderhandlehere
@placeholderhandlehere 26 күн бұрын
Cool video! You might need to increase the recording resolution next time, 360p is a bit blurry.
@jameslewellen150
@jameslewellen150 26 күн бұрын
Its a learning process, I will look at the video resolution. The setting was set because I was using a Raspberry Pi4 and everything was hanging up. Thanks for the comment
@placeholderhandlehere
@placeholderhandlehere 26 күн бұрын
@@jameslewellen150 Yeah I understand, I don't have a Pi4, so I didn't know it gets choppy while recording.
@jameslewellen150
@jameslewellen150 26 күн бұрын
@@placeholderhandlehere I got an old HP laptop and loaded Ubuntu on it to speed it up. work great. I just setup the recording parameters with that laptop and with great results, My next video will be clearer.
@placeholderhandlehere
@placeholderhandlehere 26 күн бұрын
@@jameslewellen150 Awesome! Looking forward to it.
@charlotteswift
@charlotteswift 27 күн бұрын
Nice video, James You said that you could run out of space for the instructions in the PIO blocks if you had lots of state machines. This isn't the case. If all the state machines use the same asm_pio declaration, then they will share the same instructions in each PIO block. If you have the servo running on state machine 0, it will take up the space in PIO block 0 for 6 instructions. If you then add servos on sm1 and/or sm2 and/or sm3 then it will still only take up the space in PIO block 0 for 6 instructions. Similarly, you can add servos on PIO block 1 (state machines 4, 5, 6 & 7) and It doesn't matter whether you add 1, 2, 3 or 4 servos - it will still only take up the space in PIO block 1 for 6 instructions. Sorry, I haven't explained very well🙃🙃 Also, Paul wanted us to hide all the PIO stuff so that it would be easier to understand for people who know nothing about PIO. Therefore you could insert this line 'class JamesASM:' between lines 1 and 2 and indent everything up to and including the 'wrap()'. Then all you have to do is to change: self.sm = rp2.StateMachine(self.smNo, servoSet, to: self.sm = rp2.StateMachine(self.smNo, JamesASM.servoSet, and you will have hidden all the complicated PIO stuff from prying eyes AND it will make lesson 101 a whole lot easier. Don't be tempted to put the asm_pio in the servoSetup class. That's what I did initially and it screwed things up. Feel free to completely ignore everything I've said😁😁
@jameslewellen150
@jameslewellen150 27 күн бұрын
Thanks for the comment, like the last statement. The PIO instructions with multiple servos helped keep things in control. I could only setup 2 servos as several of my servos in the various kits that I have, died. I have watched your video several times and still don't know what you are doing. Its just to complicated for the old guy like me to fathom. I see that it works but I could not follow it. Probably not your fault, more like mine.
@charlotteswift
@charlotteswift 27 күн бұрын
@@jameslewellen150 I've just looked at my program and I'm not surprised that people can't understand it because I put in so many different features - a generator function, classes inheriting from another class, class variables above the __init__, dictionaries to keep track of how many instructions in each PIO block, allowing all the servos to be completely independent rather than just mirroring each other and the various ways of sweeping. I added things one at time which made it easy to understand but I can see that looking at the finished product would be horrendous for anyone other than me!! Anyway, the main part of my comment was that 1, 2 3 or 4 state machines using the same asm_pio program in the same PIO block use the same instructions.
@RoboticsDIY
@RoboticsDIY Ай бұрын
Good tutuorial, thank you!
@paulmcwhorter
@paulmcwhorter Ай бұрын
Well done!
@jameslewellen150
@jameslewellen150 Ай бұрын
Thanks, finally got the TA6586 in, it shipped from China.
@TomatoSauseJr
@TomatoSauseJr Ай бұрын
NOICE
@EyadBarany
@EyadBarany Ай бұрын
thank you sir
@jameslewellen150
@jameslewellen150 Ай бұрын
Most welcome
@bigbogeyface
@bigbogeyface Ай бұрын
Super cool 😎 👌
@jameslewellen150
@jameslewellen150 Ай бұрын
Thanks
@charlotteswift
@charlotteswift Ай бұрын
That's an interesting approach, James. One day, I must learn how to use my oscilloscope!
@jameslewellen150
@jameslewellen150 Ай бұрын
Unfortunately Paul did not want it done that way. My main stumbling point was how to calculate the delay.
@charlotteswift
@charlotteswift Ай бұрын
@@jameslewellen150 You probably would have been able to get it to work exactly, maybe if you had made the frequency a lot bigger. Who knows!
@ativerc
@ativerc Ай бұрын
This is homework for Paul's videos but they are private. Do you have some other link? Also, if you are comfortable answering this, why are you learning Arduino/Electronics/Raspberry Pi?
@jameslewellen150
@jameslewellen150 Ай бұрын
With the link just look up Paul McWhorter and look at the playlist. I have been involved in electronics for over 50 years. I am retired and like to keep my skills sharp. However, I was not into coding software. I was a hardware guy. This is something I always wanted to do. Love the way Paul teaches the courses.
@keithlohmeyer
@keithlohmeyer Ай бұрын
Ahh using the empirical method. I like it! I calculate pulse high as 1571 usec and overall period as 19.90 ms. Close enough. Thanks for posting.
@jameslewellen150
@jameslewellen150 Ай бұрын
After looking at it it seemed the most direct path. Also I was not sure how to calculate the timing.
@paulmcwhorter
@paulmcwhorter Ай бұрын
Well done!
@VeryUsMumblings
@VeryUsMumblings Ай бұрын
I think the whole world got a little smaller! (or more Disney!) 😄 👍
@charlotteswift
@charlotteswift Ай бұрын
That was REALLY AWFUL, James!!!😁😁
@jameslewellen150
@jameslewellen150 Ай бұрын
Thank You, I thought so too. I had a problem with the audio. The buzzer would not record, I finally used the camera phone. Not ideal but it worked. Now that is a tune that will stick with you. LOL
@paulmcwhorter
@paulmcwhorter Ай бұрын
Indeed, an annoying song. Well done!
@mamadoubapassioninformatique
@mamadoubapassioninformatique Ай бұрын
WOnderful !!! Could you share the program, please?
@jameslewellen150
@jameslewellen150 Ай бұрын
I will try to upload to github
@jameslewellen150
@jameslewellen150 Ай бұрын
here is the link to the github: github.com/n6dbq/Arduino_R4
@bigbogeyface
@bigbogeyface Ай бұрын
Hahahaha 😄 Brilliant 😊👏👏👏👏
@jameslewellen150
@jameslewellen150 Ай бұрын
Thanks 😆
@jimf99
@jimf99 2 ай бұрын
Nice Solution! I like the on/off slide switch for the buzzer. Also nice touch with the Display. Great to visualize things. Kind Regards from Calgary Alberta Canada.
@jameslewellen150
@jameslewellen150 2 ай бұрын
Thanks
@charlotteswift
@charlotteswift 2 ай бұрын
H James I like your little screen and also how you can turn the annoying buzzer off. Unfortunately, you've got your timings wrong. dah should be on for 3 units and off for 1 unit. Also, you turn the buzzer off for 1 unit at the end of dit and for 3 units (should be 1 unit as I said above) at the end of dah, therefore the delay after each letter should be 2 units. This is probably why you found it hard to hear the pause between each 'sos'. If you fix these bugs, I think that a delay of 7 units would work fine. Obviously this should be coded as 6 units because of the i unit delay at the end of the last dit in 'sos'. Sorry to be so negative😿😿
@jameslewellen150
@jameslewellen150 2 ай бұрын
Not negative, just informative. Made those changes and it worked perfectly. Thanks
@charlotteswift
@charlotteswift 2 ай бұрын
@@jameslewellen150 Hurrah!!!!
@VeryUsMumblings
@VeryUsMumblings 2 ай бұрын
Cool video. I like the way you used the tft screen. 👍
@Jallal70
@Jallal70 2 ай бұрын
subscribed
@shawnlowe1392
@shawnlowe1392 2 ай бұрын
Well done!
@jameslewellen150
@jameslewellen150 2 ай бұрын
Thanks
@paulmcwhorter
@paulmcwhorter 2 ай бұрын
Excellent!
@jameslewellen150
@jameslewellen150 2 ай бұрын
Many thanks!
@charlotteswift
@charlotteswift 3 ай бұрын
Hi James I like your little screen. Just one thing - you don't need to work out the low and high grades because you could just use grades[0] and grades[numGrades - 1]
@keithlohmeyer
@keithlohmeyer 3 ай бұрын
Nice job! Thanks for posting.
@paulmcwhorter
@paulmcwhorter 3 ай бұрын
Excellent!
@VeryUsMumblings
@VeryUsMumblings 3 ай бұрын
Pretty Cool! 👍
@justmc62
@justmc62 3 ай бұрын
Great homework ..thanks for posting . Like the TFT display , will be investigating 😉
@jameslewellen150
@jameslewellen150 3 ай бұрын
The tft display library needed a change to Adafruit_ili9341,cpp look up the error code wiring_private that initially comes up and search on that. The fix to that file works. I fixed the file and saved it separate from the library so if things go wrong I have the updated file. Link is: forum.arduino.cc/t/compilation-error-wiring-private-h-no-such-file-or-directory/1146752/2
@paulmcwhorter
@paulmcwhorter 3 ай бұрын
Nice work!
@jameslewellen150
@jameslewellen150 3 ай бұрын
thanks
@paulmcwhorter
@paulmcwhorter 3 ай бұрын
Excellent!
@bigbogeyface
@bigbogeyface 3 ай бұрын
I believe there is a function called sort() that will arrange all elements of an array into order 👍 Just thought I would let you know in case you want to mess around with it a bit 👍 Have a nice day 👋
@bigbogeyface
@bigbogeyface 3 ай бұрын
Very good 👍
@techniqueskhalid9873
@techniqueskhalid9873 3 ай бұрын
Big thanks ❤
@paulmcwhorter
@paulmcwhorter 4 ай бұрын
Excellent!
@keithlohmeyer
@keithlohmeyer 4 ай бұрын
Nice job and quick too. I have not tried but you should be able to put sm0.put(0) as the first line in your except to clear the LEDs then maybe a short sleep before sm0.active(0) Thanks for posting
@jameslewellen150
@jameslewellen150 4 ай бұрын
That worked nicely. Thanks
@rassulkuatov6160
@rassulkuatov6160 4 ай бұрын
Great job!🎉
@VeryUsMumblings
@VeryUsMumblings 4 ай бұрын
🤩very bright 🤩 good work! 👍
@keithlohmeyer
@keithlohmeyer 4 ай бұрын
Nice job James. A couple of things. In lines 23 and 40 you spell tDown as tDwon. That may solve the problem. If not you may need separate variables for tUp/tDown for each callback like tUp2/tDown2. Thanks for posting.
@jameslewellen150
@jameslewellen150 4 ай бұрын
I tried both fixes and no success. Still has that extra bit before changing direction. Perplexed
@keithlohmeyer
@keithlohmeyer 4 ай бұрын
@@jameslewellen150 Ah I see you need to put the increment before the led.values in both callbacks
@jameslewellen150
@jameslewellen150 4 ай бұрын
@@keithlohmeyer Nice, works now. Sometimes I am braindead. I guess that comes with age. Thanks
@antoinenguyen959
@antoinenguyen959 4 ай бұрын
Been following the series, thank you!
@keithlohmeyer
@keithlohmeyer 4 ай бұрын
Very nice! Thanks for posting.
@phantomchuckles
@phantomchuckles 4 ай бұрын
good work, grandpa 👍
@jameslewellen150
@jameslewellen150 4 ай бұрын
I am kinda older than dirt. lol
@VeryUsMumblings
@VeryUsMumblings 4 ай бұрын
Thanks for the video! Good Stuff! 👍
@paulmcwhorter
@paulmcwhorter 4 ай бұрын
Nice!