.ino for PCB+MD13S+Danfoss valve

rightclick on the downloaded file, and choose to show in folder.
Then rename file (take away .txt) and now it should work :slight_smile:

it goes to my downloaded folder. When I right click, rename, it doesn’t have .txt on it, but still shows it as a text file

Hmm. Every time I change between txt and Zip W10 tells me that file might not be useable… am I sure I want to change.
And w10 change between txt and zip files with ability to unzip

Autosteer_USB_4.3.10_8330.zip and this is the filename after changing?

Screenshot (15)

same file and same size, so next is to restart windows :frowning:

This is what it looks like when I click rename.
I did restart
went to another computer and tried, it was the sameScreenshot (17)

Works fine on my WIN10 laptop. Could it be a confusion from the “hide extensions for known file types” setting. A stupid default in my opinion.

heck yes. That was it. Thanks

What is the difference from
digitalWrite(PWM2_RPWM, 1) to
digitalWrite(PWM2_RPWM, HIGH)

They are the same.

Is this always the same? when the output is pinmode it is the same but what if the output is in proportional output?
in this ino if CYTRON is selected it put PWM2_RPWM in pin mode but in IBT it’s prop. so it would be 1/255 of 5V?

And yes the Windows option “hide extensions for known file types” is always one of the first things I remove when using a new computer.

digitalWrite’s two parameters are pin number and HIGH or LOW. HIGH & LOW are compiler constants that are the same as 1 or 0.

The analogWrite function’s parameters are slightly different, pin number and duty cycle (0-255, might be different for various chips).

Ok thanks! i had not noticed the difference between digitalWrite and analogWrite!

So after reading this, I think for this ino pinMode must also be called for the IBT driver? Or call for analogWrite and a value of 255 in this case? To avoid problem with pull-up resistor(avoid a small output to the driver)?

Could we just remove
If (aogSettings.CytronDriver) from line 194
Make it only read
pinMode(PWM2_RPWM, OUTPUT);
?

Yes, pinMode could be used with analogWrite too although it is not needed.
.
So the only difference between the “cytron” and “IBT” setting is that you can switch between relay LO/High in cytron, always high for IBT.

@Jhmach with what program do you read the ino to get the line number? I’m using arduino IDE and I don’t like it after I used Visual Studio for AOG(So much more features)!

Arduino program
File, preferences, show line numbers
I haven’t had enough experience to like or dislike.
Pwm2 is digitalwrite in the watchdog timer isn’t it ?
Edit
This is in the ino that you sent above

1 Like

Pat, I was able to load this ino, and do a simple steering test in the barn today. I couldn’t tell anything about the higher pwm frequency, but everything worked well.
As you said, I set module config to cytron. Pwm2 and dir go high with steer switch, so opto relay sends 12v to Udc, and dir switches cytron from mA to mB, to send pwm to Us. It does work the same with ibt2 selected, but as we discussed earlier, think it’s not a good idea without adding pinMode to assure pwm2 stays high.
Overall, pretty excited with it.
Edit
Posted on telegram as well

Have any of you guys been able to use the built in steering wheel encoder with your setups? I can’t figure that one out

If it is a 2 wire encoder, you just connect to ground and signal pin on PCB. It just closes that circuit as the magnet passes same way your steer switch closes. Set how many pulses in module config

Got some testing done with new danfoss code on 2 tractors today. First was 7600 with Delphi WAS, second 7330 with factory WAS.
7600 on initial setup had trouble with front wheels paddling left and right constantly. Held line good but couldn’t get it to settle down. Moved over to 7330 and tried. It drove very well to start with, but then began paddling as well.
Finaly got frustrated and moved counts per degree to 26 and switched to Stanley. Settled right down. But was getting 6 to 7 cm off line. Switched back to PP, and it drove well. Ended up at 24 counts from original 13. 7600 set to 18 from 13, and it settled down. Proportional and output both max, and 26 min, and 28 low output on both tractors. 7600 stays solid 1 to 2 cm. Both seemed to drive very well, but haven’t got in a field yet.
Drove both tractors across soft dirt, then up over a gravel road at about 30 degree angle and back down onto soft ground, and at 6 mph, never saw over 6cm error, from flat to 3 degree roll to -3 degree roll back to flat. 7330 is high crop with 320/90R46 tires on 60 inch centers. A lot of inertia with roll. Dual with Matthias code.