20230323 ROS Lawn Tractor Meeting

20230323 ROS Lawn Tractor Meeting

This video:

Chat:
None

Index:
00:00 Terry: Talks about a dead laptop. Loading a spare laptop.
04:30 Terry: Is documenting his plans/progress.
07:00 Jeff: Continuing saga of ST Micro processor boards. Probably giving up on Arduino for STM32.
The Arduino for STM32 has various problems that I can’t figure out.
Bluepill (STM32F103), Blackpill (STM32F401), STM32F407VE, F4-Discovery (STM32F407VG).
11:50 Moving to STM32CubeIDE, libraries, USB.
13:45 Comments about using the A/D inputs.
14:10 Comments about encoders and other timers.
15:00 Giving up on Arduino IDE.
15:20 Setting the clock speed the same across boards to allow cut and paste between projects.
16:00 Testing and verifying the 3 “extra” timers.
16:20 Showing a couple of encoders used for testing.
18:10 Prototyping methods.
19:25 UARTs for remote control and debug.
20:25 Configuring the processor. Peripherals vs. pins.
21:15 Adding the LORA radio board.
22:00 Al: Asks which board will be used. Size vs. pins vs. peripherals vs. pin configuration.
24:20 Al: Asks about encoders.
25:20 Header pins.
27:00 Al: Shows his status. He is working on wheel odometry. Problems with IMU.
29:10 Terry: About heading vs. Yaw vs. rotational rate. More on Al’s code.
34:40 ROSSerial.
38:30 Jeff: More comments about analog inputs on ST Micro parts.
40:50 Al: Shows how he tracks his pins.
42:35 Pin remapping on modern processors. One more advantage/headache.

=====

Lawn Tractor Automation YouTube page:

Index for Lawn Tractor Automation group:
http://sampson-jeff.com/RosAgriculture/LawnTractorMeetingNotes.txt

Index for the original ROS Agriculture group (~250 videos):
http://sampson-jeff.com/RosAgriculture/readme.txt
http://sampson-jeff.com/RosAgriculture/ros-agriculture-youtube20230104.txt (or newest file)


All right Got it okay so this week uh had some Distractions I didn't get a whole lot Done But came down uh last Saturday morning To a dead uh Unix laptop It uh Blank completely blank screen so tried a Bunch of things F2 wouldn't work F12 wouldn't work I tried an external monitor nothing so I Giving up on that laptop and trying to Uh Use another Laptop that I had lying around Um found a USB drive that had uh Ubuntu on it That was bootable so I went ahead and Booted it Tried booting it had to go into the BIOS And make sure that the USB was where it Would look first was able to uh Get it to recognize that got an started Getting a bunch of errors that it Couldn't read the device once it got Beyond a certain point And so after checking with my friend Google he uh said that when you get to The Ubuntu screen To pull out the thumb drive and then Just put it back in And that actually fixed it I was able to Continue on and was able to load Ubuntu

And got it all up and running Um started doing some configuration on It Um Adding some tools getting Networking and all that set up Then I uh tried loading uh Ross one And said it couldn't find it when I Googled that error it said you're Probably running on Ubuntu 2204 instead Of 2004. And sure enough I had loaded the wrong Version So I had to go back and make a New bootable thumb drive With uh the 20.04 Um Thank you Then this morning I tried uh booting From it Was getting the same device error So I tried undoing unplugging it when I Got to the um Ubuntu screen Plugged it back in and it said okay now Checking File system and it goes through this Whole thing and then now I just then it Takes me to a purple screen That has nothing on it but I can see the Mouse pointer So Two steps forward one step back Sometimes you just have to wait a while You know when you're first loading these

Things up it comes up with a stupid Screen a blank screen or whatever and You can see the mouse sometimes you just Have to wait a long time before it Decides that it's finished setting up or Whatever is that that's something to Consider on that 30 minutes yeah yeah it seems like 30 Minutes should should work on that so Again try to plug in an external monitor On that it could be it doesn't like the Video driver or something what you're Doing Hadn't thought of that but I can Certainly I think this has a HDMI port on it so I can try that one Back to your first computer if you uh Plug in the charger into the laptop There's a little light that comes on That says it's plugged in and sees the Charger Uh the white light Does show Okay because I was thinking it could be Just your charger died and the thing Just ran down and now You know your battery just did so that That's something else to consider that Maybe it's just your charger is bad but That that could very well be the I see I see lights on it that's But they're kind of like it's behind the F12 key and behind one of the other keys But it doesn't really say what it's for

So I'd have to do more research on that One But I've uh Started uh Google doc Yeah I need to share it I imagine Okay so For this week Um Let's see The compact died that'll kind of gone Through all of this Uh so I'm gonna try and my plans for This next week are to get the Ubuntu 20.04 loaded onto the Acer laptop Then uh load Ross get Ross loaded onto That laptop And continue with the things I had from Last week which were breadboarding All the functions for the itsy bitsy Which include adding the a to d Adding the serial Communications to my Raspberry Pi Um Move it to a saddlest breadboard or away From the solderless breadboard onto a Breadboard mount the breadboard and Motor controller on Ice no one Start B and C server on the Raspberry Pi And continue uh or start playing with uh The tutorials on for Ross on the laptop Any questions No I guess not For me

I I just had to chuckle though your Accomplishment was that your Acer died Well not the Acer it was the compact one Yeah But yeah that was Don't know what happened with that one But I had obviously stopped using it for Windows for some reason and I don't Remember what because I've got those Like I said I've got four laptops Sitting around Ample spares We would hope so Jeff you want to go next or do you want Me to I don't know I I could go next Um but far away so last week I was Saying I was trying to get my The all these little boards that I was Buying I was trying to get him to work With Um Arduino you can get Arduino for the St micro parts and I I've had ups and downs and much Frustration I think I finally decided to Give up on Arduino for these boards The if I use the blue pill board Do I have some uh Props here Well here here's the blue Pill board So the blue pill board is about it's a Little longer than an Arduino Nano it's Got a STM 32f-103 processor on it so it's a 48 pin

Processor and it runs it uh 72 megahertz I think is what it is it Turns out on the Arduino uh IDE for this Board it will indeed work I can get the USB to talk I can I can program the Thing and when I do my extra stuff I'm Trying to get my quadrature encoders to Work and I have to go in and I have to Play with the registers to make that Work and I can actually get that to work On that board so in in reality most of The stuff I want to do looks like it Would work on the blue pill So then I bought the black billboard I lose everything Well I can't I can't find it right now So I had one loose here Oh here it is right here So the the black pill board I only turn Off my background To use Virtual background none So my my black pill board it's it's uh I Think it's got like four extra pins or Something over the blue pill but I think Those extra pins are actually just Things like uh it's bringing out the USB Connections and I think it's got the Voltage references for the 80d coming Out but otherwise it's it's about this It's the same concept it this one has a USBC as opposed to a micro USB connector And it's also got they both have this uh Adapter out here plug in the uh The little um

These these things a little debugger Port so that's why I've been programming The thing and it turns out on the black Billboard I can I can power it up I can Talk out the USB but when I load my code For the encoders which is using talking To the registers it will not work and I Have no idea why I've been fighting with That and I keep changing it and I cannot Get that to work at all so I I think it Is something in their configuration when They started the thing up it's supposed To go on the line and configure certain Things use certain files and I think Something there is not working and I Haven't figured out what the the problem Is with that so anyway both both of Those two boards and get the USB to work And they seem to do standard Arduino Functions but but only one of them will Let me play with the registers and make My encoders work so then you can move up To this board which is the Um that's a f407 processor and it's got Twice as many pins so it's a 100 pin Part on the board and one of the Drawbacks is the advantages and Drawbacks it's got dual row headers here So there's a dual row here and a dual Row here so you have almost 100 pins on This board But you can't plug it into a Proto board Say like on a the skinny the small ones You can plug them into a photo board

Like that and just stick wires in and Everybody's happy but you can't plug This one in to a Proto board because It's got two two rows of pins on the Thing I suppose you're really clever you Can just solder in uh you know a single Row here and a single row here and get It to plug into a Proto board but sure Enough the pins you want aren't going to Be there so so I've got this board and If I I've got this one or the um the F4 Discovery board which is the official One from SD micro and it's got Essentially the same processor on the Board uh the the little one here has Half as much memory as what the big one Does over here but otherwise it's the Same the same basic processor And so what was I going to say uh oh so I I try to get this to work with Arduino And I cannot get this board or the or This board neither one of them I can't Get the USB port to work so I go through It I put in the code and say uh I I just Simply say here's the board I'm using Load up the blink and hello world Program and I plug him in and says no I My D message under Linux says no I don't Understand that I saw you plug something In but I can't initialize that port and Again I can't figure out why that is so I think that also comes back to Something in their configuration files Doesn't understand the board that I have

And is trying to run the right stuff so Anyway that that's a problem on those Now if I go back and use the the St Micro Um Uh development system it's called STM Cube IDE I think is what it's called and There's this big thing that's Eclipse Based editor and has massive compilers In it and it supports like 500 different Chips or something and that thing if You're wanting to go the trouble and Load it up and write code for it because You have to write all the code from Scratch they've got a bunch of libraries To give you but but say if I want uh I Want the a to d stuff to work I have to If I'm lucky I can find one of the Libraries I can drop in and it works Fairly quickly and the USB stuff is Quite simple I just said enable the USB And load what they call their middleware Which is the the libraries to talk to The USB and then I basically did that And compiled it and then my USB port was Working to the point where I can just Say Um I have a call that you say Um it says something like call uh USB FS For full speed transmit and you just Pass it a buffer of data so you just say Put the string into this buffer and then Say call that routine and pass it that Buffer and the length of the buffer it

See also  I'm TIRED of My Grass Growing SO FAST! // STOP Grass Growing with PGR

Just magically shows up at the other end So that actually works out fairly well And I think I've got I I can I can go in And configure you know build a project For the blue pill the black pill and Whatever this board we'll just call this The F the f407 board because I it does I Don't think it has an official name for It but anyway uh any of those I can Create a project I can get the USB to Work on all those uh I can get my Encoder to work on the encoder stuff to Work on all three of those boards this Board I can't get the USB to work and I I think it's got It's got it's an On-the-go Port so it's got some extra Switching and stuff in there that maybe Maybe that's why it's not going to work I have to be smart enough to run that And so far I haven't figured that out So I'm really down to the point where Um this this happens to be the black Billboard I've got it stuck on a Proto Board and I got a couple pots put on Because last night I was trying to get Get the ahd stuff work and I got those To work you know Arduino you just simply Say you know initialize that pin and do An analog read but it's a little more Complicated to make it work on this but I found some examples and put them in And now if I turn these pots you know They go zero to four thousand ninety Five both of them so that's working and

I've got the encoder stuff loaded on Here And then I've got the uh I have at least I got three three more timers one timer That says uh generate zero to 100 pwm to Run the motor and another timer it says Generate the the pulses I need to drive An RC Servo so it it it takes the full 16-bit value and I've get the right Pre-scalers I can make that wrap over at Like 60 hertz or 30 Hertz whatever I Want and then by putting in the numbers I can control you know control the width Of the pulse so you got this big long Thing like this and then out here at the Beginning you can control the width out Here to control the servo so I got that Timer and then the other timer I just Set up a one millisecond time base so I Just configure that one so you know once A millisecond it's going to call and Interrupt and then I can use that for Whatever timing I want to do So I'm thinking at this point as I say I Think I've given up on the Arduino stuff I might come back to it someday and try To figure out what's going on but I can Go out I can program these boards with That the big IDE and that's that's Basically where I'm at right now I Started putting this one together I got The two analog inputs working the two Encoder inputs working and I just I I Can actually copy the code for my Sammy

Too being the same process for family I Can copy that code over but I changed The clock speeds on these things because The uh the blue pill runs at 76 Megahertz the black pill runs at 84 Megahertz and then the the f407 boards Running 168 megahertz but in order to be Able copy code back and forth directly If I slow the the big board down to the 84 megahertz like the black Bill I just Go ahead and grab a chunk of code from Here and drop it in here and the thing Will run directly I don't have to go Fiddle around say well what what Prescalers do I need and all this kind Of stuff so I'll probably do that so I Can get those get those to work Uh anything else important I have to say Here so so really those three extra Timers I just have to go through and Initialize each one and put my scope on And make sure they're doing you know Giving me the the frequencies and the Pulse woods and all that stuff to make It work So that's kind of where I'm at on that And Other than that oh here's here's um what I was doing to test my encoders I had This this this motor laying around this Is what this is what I call the small Pitman Motors so this is about half the Size of the one that I have on my robot And Terry's got the same Motors on his

Robot that my my my current Little Robot Has and this this is a smaller one it's Like a half to three quarter of the size Or something it does not have a gearbox On the front but it does the encoder Built on the back so I'm just using that As an encoder so I can I can just turn The thing like this and see what the Thing's doing and I can verify by Putting you know putting a it's got These uh holes in here like say this one Right here and then on my on my gear I Just put a mark on there with a with a Sharpie so what I can do is I can line That up this is all backwards so anyway If I line it up like that point it at That screw right there and then reset The processor I should be able to turn It one full turn And predict what that's going to be and Sure enough that comes out to 384 counts By doing one one full turn so each one Of these encoders has different Um Number of counts per per Revolution this One happens to be 96 counts per Revolution which is really typical for The Pitman Motors you can get ones with Higher you can get up to like a thousand Something but you know just these all Came from the local surplus store so Basically you take what you can get and So that's what I was doing that and then On my my Sami 2 I've got one of these

Chinese encoders that uh they're they're Around ten dollars to twenty dollars Depending when you buy them and what the Resolution is and it's real nice it's Got ball bearings all the way through It's got a six millimeter shaft and I Just went through and soldered uh Soldered some of the jumper leads onto The end of it so I can plug those in in Order to test it so that's that's Something I can test with And I guess Um trying to think there's anything else That I've done Um basically we're putting this thing on The Proto board I just want to put you Know down at the end here I've got all this room down here I'll Just plug in some header pins and then I Can plug in and see like I've got these Got these I can I can plug into the Header pin then to make my connection And the wires coming from the Pitman Motor on my actual robot they're six pin Connectors and I just saw I'll just put Six pin headers here and plug those in And as you run wires from here up to my My board where it needs to go and then Other than that the other physical Connections I need three wires to go to My motor power driver and I need the Three wires to go to my RC Servo of Which I only need one of those plus I I Suppose I have to decide word hook the

Grounds up and when not to hook the Grounds up but that's just a matter of Putting you know putting extra Connectors down here on the board and Plugging stuff into it And the only other thing I've thought of Right now is um I've got the the voltage signal out of The new RC Servo will give me a position Out of it I'm gonna have to do some uh Some playing around with that I'll Probably have to buffer that so I don't Load it down and then on after I buffer Then I put a voltage divider to get down To zero to 3.3 volts and then plug that Into it so it'll be a single wire Possibly with the ground on that And I guess you know back to back to the Fact that I like to plug my remote Control directly into my low-level board I was also trying to get my uarts uh Configured on this thing so I wanted to Have one uart that will talk to the Remote control unit and then have Another your like Terry wants to do Where I've just got an extra Port that Does not go through USB And I because I'm back to that problem Right now I loaded up putty last night And I fired this thing up and said okay Connect so so I start the program and It's you know trying to put something Out the USB port so I start a putty and Say load it and then they the numbers

Click click click click click down the Screen but as soon as I unplug the USB Cable putty just dies completely just Goes away on me now if you use the Actual a physical uart and go through an Ftdi connector then your your interface Doesn't die every time you unplug you Know either reset the processor or turn The processor off or unplug the Processor because you still got the Connection between the ftdi adapter and Your laptop or laptop or Raspberry Pi Whatever you're running so I I wanted The two uarts and that's the other Grievance I have with these little Boards Um they've got a lot of peripherals and Not really enough pins so you have to Pick and choose Choose your peripheral and see which Pins it takes and that's going to Interfere with a different peripheral so It gets real frustrating trying to go Through that but I finally got to the Point where I got my two encoders my pwm To drive my motor motor controller board Motor driver board I've got the output To drive the um The RC Servo and then I wanted my I Wanted two uarts one to go to the remote Control module sitting next to it and Then the one I can use for debug or Whatever and it got down the point where I could not get both uarts to work and

See also  I WAS MOWING this OVERGROWN MINI GOLF COURSE for FREE and got CAUGHT BY THE OWNER

Then I think it was yesterday I was Playing around with it just kept moving Stuff around and finally got the point I've got both uarts configured now so I think I'm at the point where That's all I really need to do to make This stuff work Uh I do need to go through and and take My uh My Laura board the one that's the that's Got the radio and the processor all on It it's like the one that's in my remote Control box And I just need to program it and then Hook the the uart between that one and My my new board here and then I'll be Able to you know pick up my existing Remote control and drive it around or Can at least control everything using That so that's That's kind of where that needs to go And other than that I guess that's so It's just a matter of I just again just Have to sit down and finish off testing All these peripherals make sure they're Doing what they're supposed to and They're running at the right speed and All this kind of stuff so That's uh so I'll ask is there any Questions on any of that stuff that I've Been babbling about Which of the blackboards or black pills Do you think you're going to end up Using

Well to start with I'm going to use this One so it's the small the small one That's got uh I think it's like like 40 42 pins on the board And I'm going to start with this one and Then probably because it's a it's a real Pain as I say trying to take the Peripherals and the existing number of Pins and get them to all exist at the Same time but if you go with a big one Like this it's got twice as many pins it Makes it much easier to do that and also The bigger chip that has more Peripherals so it's got it probably has More I squared C interfaces more SPI Interfaces I think it's got up to six Uarts on this board whereas the little The little board claims it has three Uarts but I go into the software and it Says oh no you are six it's it's in red And I for some reason I can't use that One so I I can only do two u-words on That board in the first place So it's just just a matter of I'll Probably start with this little one Because I can just plug it in a Proto Board and I was able to get it Configured to the point where it should Should work and then when I decide That's not going to work then I take the Smaller board like this and or take this Board it's the bigger bigger processor And that makes it much easier to Configure everything because if I say

Set up my yard to my my uarts my uh my Decoders then they're not gonna Um they're not gonna directly interfere With each other so it just makes it much Much quicker to do that And but then I it's harder to deal with Because then with the Dual row headers And see here I've got these uh one side I soldered the pins on and so I'll have To get some kind of a socket and I'll Probably just take like a perf board Like this this is what I did in Sammy Too I took a perf board and then Soldered down two of the Dual row socket Boards so then you just plug this plug This into the into those sockets and Then you've got all this room out here To put on connectors or whatever Whatever you need out there to make that Work So that's the first thing is I'll use The small board and until I have a Really good reason to swap that out then I'll move to this next bigger board And but that's more work I have to Solder the things down I have to have Physically solder wires between Everything I can't just plug plug them In unplug them like you do on the Plugable breadboard so And the encoder that you held up that You had put on the um Look like female receivers You're going to connect that ultimately

To your Drive Wheels to to determine the Position of those is that where you're Going to use that encoder Um Using this encoder just so I have Something I can I can physically grab it And turn it right now to verify Everything's working and that's the same Concept with this motor I just I just Used it because it was a convenient way To get an encoder and I got some giant Motors out here with encoders I could Use denim but the ones that are on the Robot right now they they look like this But it's got a big gearbox here and then A belt drive to my wheels so so Basically the motors are on it already Have the encoders built in Just like just like this one's done and Then it's got the gearbox and then a Belt to run the run the motor so that's So so that's why it and those are Already on the robot I just have to Simply take those connectors and plug in And I was saying that see on my if I use These uh it's a single inline header and It I bought these at um Um not eight or fruit the local Micro Center I if I go into Micro Center on Just on the Shelf they've got these bags You can buy these headers that they're They're ah damn it they're long on both Ends which means you can plug them into

Your uh Plug them into a Proto board or plug Them into whatever you want whereas the Short ones this this is actually this is Actually a double double row one but see Normal ones just have a short one on one Side and long on the other side so you Solder this onto a board and you can Plug your Jumpers in here but the one I Just the one I just dropped on the floor Multiple times you know the the length Is like this where you can you can plug It into the Proto board and then stick a Still put like a jumper on there and I Have some that are really long that came In some scrap stuff I got one time there The pins are like twice as long sticking Out both sides so I'm guaranteed those Will work because they're long enough Yeah I can plug those anything I want So there's again just for prototyping That that's just a quick way to uh you Know plug something like those those uh Jumper leads I showed on that encoder You know these kind of things I can plug Those into into these kind of things and Then plug plug the uh the header into The the Proto board so that's a just a Quick way to get all the stuff tied Together without without soldering or Anything you know at that point Cool no other questions for me Okay well then I guess uh we'll turn it Over to you then

Okay let's see Um So last we spoke I was gonna go work on A Wheel based Odom Statement so I've got a draft of a Program I'll walk through quickly I Um Was struggling to test that because my IMU package that comes from an outfit Called chip robotics Wasn't in my I have two workspaces that I've been Using one that's Has a whole bunch of stuff and the other That I'm trying to keep really Streamlined this Ross one works base is The one I'm trying to keep really Streamlined and When I put the IMU package in there it Wouldn't work and so just like Terry's Frustration level was high on Hardware problems I was Fighting through trying to get a clean Cat could make with the with this Package I also got to share out what I'm Labeling a shell of a program that'll Switch between Wheel Odom and rtk based Odom but it's Just a shell At the moment so um but I badly started Started on that

Next As for me I've got a launch file That wasn't working and again it goes Back to this IMU I'll show that in a Second Um I want Because this The IMU that I have or the way that has Been packaged by this outfit called chip Robotics every time you started it Starts at zero yaw Um And so I've got to update the launch File so that I can You know guesstimate what the yaw is and Update that so the IMU starts off Um I think in a reasonable Manner I've got to test my Odom wheel Python script Would it be um Setting the yaw or setting the direction Because isn't yaw the movement I'm gonna depending on who you talk to I Mean there's probably a more proper way To say it there's heading And then which is typically It will be based in radians so One you know half a pie is I think if I get it right half a pie is South and Negative pi is West and positive Pi is West So it's setting that Okay

I would say that at least in this case Heading and yah are the same thing You're you're thinking of rotational Velocity which is which is your change In change in heading or changing yeah That gives you a rotational velocity out Of it which is what I thought most Imus Give you Imus give you lots of things so you just Have to pick and choose and depending Which ones you buy some have more Information than others but yeah there's Different fields in there that tell you Lots of things that are going on Yeah I mean the I don't think I have Um Let's see do I have something handy that Says what I'm getting I mean the There's an actual message an IMU message Um But I've forgotten off the top of my Head what are all of the data elements In there but this is my Current wheel Odom I'm not a good Programmer but I'm trying to use a class Um which has been a learning exercise Um Covariance I still you know Matrix math You guys are probably smarter about that Than me but figuring out covariance is a Sort of black I just cut and pasted Stuff is what I'm doing at the moment Um

So it gets the left meters traveled the Right meters traveled does this fancy Math To Um You know update to help build the to Give me an X and Y position in order to Build the Odom Um Statement and it needs to load this Quaternion which I get from A Yar Um In radians so Anyway that's just it's not very long Underlines or so that comments Um That's one thing and then the let's see Where's my Do I have my No no that's just my procedures for Testing that thing I thought I had my Launch file For working with this thing but I'll It'll all be out on The GitHub But um yeah so That's where I'm at at the moment is Getting a launch file that'll run and Bring up arviz and the IMU and the wheel Odometry with my map So that I can sort of test all of that Working together And uh

Get that initial heading in there Yeah and then when I get back out on the Road or in the yard to Figure out where I'm going to use a PID For speed control or just Have a bit of a table of speeds and Servo settings Um That's still got to be yet to be Determined Then that's where uh so I'm you know Happy with progress but it's Frustratingly slow Guess you don't know anything about that Do you Terry Not at all one step forward two steps Back That would be my gate Maybe Maybe worse on some days and better on Others but pretty darn close this week It's been one step forward two steps Back yeah usually it's two steps forward One step back just It is man you have to have to have Tenacity to stick with this I gotta tell You I'm like come on raw cereal why aren't You working it's like something simple That's supposed to work Anyway And cat can make I Hate Because I don't understand it I don't

See also  DIY Lawn Tractor Counterweight

Understand All the Library settings and compiler settings And Yeah that's just like walking through Mud for me That's why I started this in Python I'm Like I'm not going to go through all That cat good stuff We'll see anyway I'm not enough babbling On on my part Yeah speaking of raw cereal that's That's one of the next things I want to Do is look at that and decide where I Want to go do I want to go with that and Try to use that or do I just want to Continue on saying print out this Statement that's a message and then There's and decode that when I get it so You know before before too long I'm Gonna have to look into that try to Figure that out And I assume you can tell it you know Either go out to USB or whatever you are I think when you you can figure it you Just tell it what you want to You know what you want to talk to so We'll see how that works out I have some notes on um sort of starting From scratch on Raw cereal it's not they're not very Clean Um But if you get to that point

And one of them I'm just paging through Them as we sit here Um Because it was finding the right there's For me because again I'm trying to use Vs code and platform i o Uh to upload code and you've got to have A the library that you use to do that Needs to be in sync with the library That's on the In our and certainly in my case the Laptop that it's gonna Talk to and Um Yeah you have some options so yeah I'm Happy to Tell you more when you get to that point And I just went into the examples I Loaded the uh some some kind of Ross Package it might have been the Ross Serial package onto my Arduino and under Examples it says you know here's an Example that will say now to udometry or An example that blinks the light or Whatever and those load up and run so It's not it seems like it won't be that Hard you know just just get the examples Around is quite easy but then try to Merge everything together might get more More complicated as I go so But anyway that that that does seem to Be working and But that just yeah another thing I just Need to sit down and try it here one of

These days Uh to see to see what's going to make Take to make this stuff work And there's a c version and a python Version on Raw serial too when you Started in your launch file so That is um That's a Nuance that we have to decide Which of those platforms you want to use And that's the there's there's a node That runs under Ross and you're saying That comes in either python or C plus Plus Do you do you actually modify those Because it looked to me like I didn't Realize how this stuff worked I started Digging into it and I realized that you Know they've got like you know a Thousand different message types that You can send back and forth or maybe Maybe hundreds of message types and it Looks like Basically If you can wedge in what you got there You don't have to make any modifications At least on the the Ross end and you Just start up that node that should all This stuff should work so that was kind Of my impression but I haven't actually Tried that yet Yeah mine Um My issues were linked I think more to Platform i o and trying to use vs code

And trying to get the library In sync at that level that We you know not using the Arduino IDE I Think that was Part of the root of of Um my issue But I think I've got it working now And can replicate it when my When my laptop dies And I have to go back to scratch Oh another another comment I was going To make when I was configuring my little Black billboard and try to get all the Timers set up and then try to get all my Yards okay now I need some analog stuff By the time it's done I went and pulled Up the list and there's only four pins That I can do analog on because Everything else has been used up by Something else but I was able to just Select two pins and say make those Analog and then I had to get somebody's Code because they being big modern Processors they want you to use dma on Your your analog stuff so they got some Really cute stuff if you really if you Need it and you're willing to figure it Out because on my Sami 2 I I didn't Think I could just go out and say you Like an Arduino you just say configure The pin and then say Analog read on this pin and it works I Wanted to be able to do that but when I Was looking at the first time I couldn't

Figure out any way to do that so you Either have dma or something else that Was some Modern thing and I actually Made that work on Sammy too so basically You set it up and say I want to take Analog pins one three six seven eight And you put those in a list and then you Start the thing up and it just Automatically is reading those for you So then you can just go out and read say Array entry one which is going to be the First one array entry two would be the Second one and that that'll work but it Just it seems like way more complicated Than I wanted to figure out so I found Some other guys saying oh I here's how You here's how you read a single pin and He said it's not directly supported he Said it's not supported anymore when That when you build the code so I just Took his code and copied it in there and It it does indeed work so I can just go Ahead and say read read this pin and it Gives me a value back and so I got Around that but but the thing was as I Say you've only got so many i o pins to Start with and every time you assign a Peripheral it chews up some of those Pins size when it's all all said and Done I got four pins that I could use For analog and I've used two of those And I still need to have uh I need to Have like the direction bit for the Motor driver and then there was another

One that I thought I needed for either Input or output so but but I think I Think I've got it all to the point where It'll all fit now I just need to I just fired up and then test all the Stuff to see what's doing Sounds like a plan That's all I got Oh what's this It's colorful There's my mute button I was trying to Find the mute button this is not perfect But this was my attempt at using the I mean it's Libra office calc but Trying to Keep track of the pins they're Number and the commands that each of Them Would would take Um And I mean I'm sure you have your own Way of doing that but this just worked For well partially worked for me Because then on mine I have Depends on the radio control and then The pins on the tractor you know which Are Um it's the same board but using Different pens but some are blocked out Like for the Laura as you were saying Some are standard I'm Was focused on SDA or I2 squared i2c Stuff

But anyway having a little layout Showing all your pins and which you do Have access which you don't have access I also had the complexity of I created that I don't know what you Call it daughter board or something Where I was Plugging my board into and Pulling the pins out so it was all it All got confusing for me But it was it was it was uh one way to Get it organized I can't imagine having 100 pins Oh well there that feels like luxury it Also feels like oh my gosh how am I Going to keep track of all that You've also got the concept on this Processors you could remap the pins so Say I assume I assign uart won well if That's going to conflict with something Something I I can click on something or Execute a command I can move those two Pins somewhere else on the board so that Frees up those pins for whatever the Other peripheral was and I I haven't Done any stuff on this one I haven't Done that back on Sammy 2 I was moving Stuff around To keep it happy and that's just one More one more headache to try to figure That stuff out I was like an FP what is what are those Boards called fpga field programmable Gator race or you can

It's not quite quite that elaborate but But yeah some of the pins you can move And some of them you can't and the other Problem is if you're using their setup Tool you say okay give me give me this Uart this is like I'm going to give you These these two pins their default and You assign and say a can bus and says Well here let me let me move that uart For you so so you have to be careful so It's not it's not moving stuff you don't Want it to but you can in the the setup Tool you can go and you can click on a Pin and say lock that down you can pin It so it doesn't change so if I want my Uart on those pins maybe the board's Already wired that way so you say assign The uart and then pin those so they Can't be moved so if I assign something Like say a can bus it it wants to use Those pins but it can't so it'll grab The other it's alternate pins or just Simply tell you that it won't work and It's up to you to figure out after that So just just more stuff you have to Learn and play with and fight with to uh To get all that stuff to work And then I noticed my esp32 board that I'm using from this outfit called ttgo I have version one of that and they're Up to like The sixth version so I can't you know it Won't be long before people are saying Hey you need to upgrade to the latest

Version Yep That's all I got Anything from you Terry Just Gonna try and get uh My first goal is to get the uh We've been to 20.04 onto this Acer Laptop Okay

You May Also Like

About the Author: Mowrs