Nice Solution. Mine was much more complicated. 👍 I did a partial solution and then had to go back and fix it!
@jameslewellen1506 күн бұрын
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.
@VeryUsMumblings6 күн бұрын
@@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 👍
@paulmcwhorter7 күн бұрын
Nice work!
@paulmcwhorter7 күн бұрын
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.
@alistaircook19978 күн бұрын
I like your solution to this weeks homework, well done. First time I found your youtube channel
@VeryUsMumblings8 күн бұрын
Good Stuff! 👍
@arnoldschmucker99779 күн бұрын
Nice!
@jameslewellen1508 күн бұрын
Thanks
@leeg.14029 күн бұрын
Nice video. I like the nice big breadboard too. I need to get one. Regards, Lee
@jameslewellen1508 күн бұрын
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.
@keithlohmeyer23 күн бұрын
Nice job.
@placeholderhandlehere26 күн бұрын
Cool video! You might need to increase the recording resolution next time, 360p is a bit blurry.
@jameslewellen15026 күн бұрын
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
@placeholderhandlehere26 күн бұрын
@@jameslewellen150 Yeah I understand, I don't have a Pi4, so I didn't know it gets choppy while recording.
@jameslewellen15026 күн бұрын
@@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.
@placeholderhandlehere26 күн бұрын
@@jameslewellen150 Awesome! Looking forward to it.
@charlotteswift27 күн бұрын
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😁😁
@jameslewellen15027 күн бұрын
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.
@charlotteswift27 күн бұрын
@@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Ай бұрын
Good tutuorial, thank you!
@paulmcwhorterАй бұрын
Well done!
@jameslewellen150Ай бұрын
Thanks, finally got the TA6586 in, it shipped from China.
@TomatoSauseJrАй бұрын
NOICE
@EyadBaranyАй бұрын
thank you sir
@jameslewellen150Ай бұрын
Most welcome
@bigbogeyfaceАй бұрын
Super cool 😎 👌
@jameslewellen150Ай бұрын
Thanks
@charlotteswiftАй бұрын
That's an interesting approach, James. One day, I must learn how to use my oscilloscope!
@jameslewellen150Ай бұрын
Unfortunately Paul did not want it done that way. My main stumbling point was how to calculate the delay.
@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Ай бұрын
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Ай бұрын
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Ай бұрын
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Ай бұрын
After looking at it it seemed the most direct path. Also I was not sure how to calculate the timing.
@paulmcwhorterАй бұрын
Well done!
@VeryUsMumblingsАй бұрын
I think the whole world got a little smaller! (or more Disney!) 😄 👍
@charlotteswiftАй бұрын
That was REALLY AWFUL, James!!!😁😁
@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Ай бұрын
Indeed, an annoying song. Well done!
@mamadoubapassioninformatiqueАй бұрын
WOnderful !!! Could you share the program, please?
@jameslewellen150Ай бұрын
I will try to upload to github
@jameslewellen150Ай бұрын
here is the link to the github: github.com/n6dbq/Arduino_R4
@bigbogeyfaceАй бұрын
Hahahaha 😄 Brilliant 😊👏👏👏👏
@jameslewellen150Ай бұрын
Thanks 😆
@jimf992 ай бұрын
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.
@jameslewellen1502 ай бұрын
Thanks
@charlotteswift2 ай бұрын
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😿😿
@jameslewellen1502 ай бұрын
Not negative, just informative. Made those changes and it worked perfectly. Thanks
@charlotteswift2 ай бұрын
@@jameslewellen150 Hurrah!!!!
@VeryUsMumblings2 ай бұрын
Cool video. I like the way you used the tft screen. 👍
@Jallal702 ай бұрын
subscribed
@shawnlowe13922 ай бұрын
Well done!
@jameslewellen1502 ай бұрын
Thanks
@paulmcwhorter2 ай бұрын
Excellent!
@jameslewellen1502 ай бұрын
Many thanks!
@charlotteswift3 ай бұрын
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]
@keithlohmeyer3 ай бұрын
Nice job! Thanks for posting.
@paulmcwhorter3 ай бұрын
Excellent!
@VeryUsMumblings3 ай бұрын
Pretty Cool! 👍
@justmc623 ай бұрын
Great homework ..thanks for posting . Like the TFT display , will be investigating 😉
@jameslewellen1503 ай бұрын
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
@paulmcwhorter3 ай бұрын
Nice work!
@jameslewellen1503 ай бұрын
thanks
@paulmcwhorter3 ай бұрын
Excellent!
@bigbogeyface3 ай бұрын
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 👋
@bigbogeyface3 ай бұрын
Very good 👍
@techniqueskhalid98733 ай бұрын
Big thanks ❤
@paulmcwhorter4 ай бұрын
Excellent!
@keithlohmeyer4 ай бұрын
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
@jameslewellen1504 ай бұрын
That worked nicely. Thanks
@rassulkuatov61604 ай бұрын
Great job!🎉
@VeryUsMumblings4 ай бұрын
🤩very bright 🤩 good work! 👍
@keithlohmeyer4 ай бұрын
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.
@jameslewellen1504 ай бұрын
I tried both fixes and no success. Still has that extra bit before changing direction. Perplexed
@keithlohmeyer4 ай бұрын
@@jameslewellen150 Ah I see you need to put the increment before the led.values in both callbacks
@jameslewellen1504 ай бұрын
@@keithlohmeyer Nice, works now. Sometimes I am braindead. I guess that comes with age. Thanks