Automatic Control and User Interface for Central Tire Inflation System

ok, you do not understand what i want :slight_smile:

then lets try something else:) , just for quick check, try this. replace all this code:

with this:

urhleypibunadur:440: error: macro "constrain" requires 3 arguments, but only 1 given

   setPoint = constrain(param.asInt() / 10.0);

Hi @Eyberg, how it is going with the project?

The above (posted earlier) have to certainly work (it works in one of my projects)

@wanek
constrain() is an argument boundary limiting function, it needs limits to work properly. :slight_smile:

okay, okay, my bad. i meant:
setPoint = param.asInt() / 10.0;

this is just to check if works correctly. than you can add the validations back.

it works nice and flood error is out :slight_smile:
Is just trying to get more opportunities with psi :slight_smile:
has been shopping solenoid valve and is to finish this design.
I try this and that and see what it is doing and even if all the parameters go to the right places :slight_smile:

@wanek

no error but do not get 2.4 or 7.25 Only 2 or 25
setPoint = param.asInt() / 10.0;

And one more thing… the setPoint is globally declared as double byte integer:
int16_t setPoint = 0; //[Tire pressure storage unit]
so it is either limited in resolution to one PSI, OR the resolution “multiplying” is done somewhere else.


OK, checked, and the setPoint is stored as a PSI x 100 value, but ON THE DISPLAY ONLY it is recalculated to proper display value!
So @Eyberg the function needs a bit rewriting :stuck_out_tongue:

1 Like

it is out of my hands then :slight_smile: but thanks for your help

what is the max PSI you are taking into account (the min-max limits?)

@Eyberg, can you check this one (and set slider limits in app to 1000 min, 5000 max)

BLYNK_WRITE(V11) { // Blynk press SET slider, where V11 is MY virtual pin (copy/paste)
	int pinValue = param.asInt();
	setPoint = constrain(pinValue, 1000, 5000); //this is where you put your limits of psi, multiplied by 100 for increased resolution
	delay(50);  //you can omit this one - was needed in my specific case
	lcd.print (0,0, ((float)setPoint)/100,1);   //here you can send your setPoint to vLCD
	Serial.print(F("new preset setPoint: "));
	Serial.println(((float)setPoint)/100,1);
}

Max is 35psi an min psi is round 2 to 2.5psi but the drive usually in 3 to 4psi but when it is hard skills can make the difference of a half psi.

In this video on min 6:57 can you se me frive on 3psi :slight_smile:https://www.youtube.com/watch?v=ScGpRv-dctg&t=7s

Error
C:\Users\Elvar\Documents\Arduino\urhleypibunadur\urhleypibunadur.ino\urhleypibunadur\urhleypibunadur.ino: In function ‘void BlynkWidgetWrite11(BlynkReq&, const BlynkParam&)’:

urhleypibunadur:458: error: no matching function for call to 'WidgetLCD::print(int, int, float, int)'

   lcd.print (0,0, ((float)setPoint)/100,1);   //here you can send your setPoint to vLCD

                                          ^

C:\Users\Elvar\Documents\Arduino\urhleypibunadur\urhleypibunadur.ino\urhleypibunadur\urhleypibunadur.ino:458:42: note: candidate is:

In file included from C:\Users\Elvar\Documents\Arduino\libraries\Blynk\src/BlynkWidgets.h:11:0,

                 from C:\Users\Elvar\Documents\Arduino\libraries\Blynk\src/BlynkSimpleEthernet.h:26,

                 from C:\Users\Elvar\Documents\Arduino\urhleypibunadur\urhleypibunadur.ino\urhleypibunadur\urhleypibunadur.ino:32:

C:\Users\Elvar\Documents\Arduino\libraries\Blynk\src/WidgetLCD.h:26:10: note: template<class T> void WidgetLCD::print(int, int, const T&)

     void print(int x, int y, const T& str) {

          ^

C:\Users\Elvar\Documents\Arduino\libraries\Blynk\src/WidgetLCD.h:26:10: note:   template argument deduction/substitution failed:

C:\Users\Elvar\Documents\Arduino\urhleypibunadur\urhleypibunadur.ino\urhleypibunadur\urhleypibunadur.ino:458:42: note:   candidate expects 3 arguments, 4 provided

   lcd.print (0,0, ((float)setPoint)/100,1);   //here you can send your setPoint to vLCD

                                          ^

exit status 1
no matching function for call to 'WidgetLCD::print(int, int, float, int)'

ok, so the .print doesn’t like this kind of syntax. we will try different approach then


And what about now?

BLYNK_WRITE(V11) { // Blynk press SET slider, where V11 is MY virtual pin (copy/paste)
	int pinValue = param.asInt();
	setPoint = constrain(pinValue, 200, 3500); //this is where you put your limits of psi, multiplied by 100 for increased resolution
	delay(50);  //you can omit this one - was needed in my specific case
	String setPoint_str = String((float)setPoint/100, 1);
	lcd.print (0,0, setPoint_str);   //here you can send your setPoint to vLCD
	Serial.print(F("new preset setPoint: "));
	Serial.println(setPoint_str);
}
1 Like

yes there was this :grinning:
@marvin7 I’m so happy now, thanks for this :slight_smile:

Ok, should be fine now, but when setting things up, do not forget to validate pressures with manual manometer!

He, november weather outside… Not the best one this time :slight_smile:

yes know I need to see this all on the correct pressure on all variables.
Yes, this trip took 16 hours and we went 300 kilometers :slight_smile: and 90L petrol

:scream: 16 hours of driving is a lot. 16 hours and this kind of weather is an overkill!

OK, keep us informed, seems you are quite close though.

1 Like

Clears lcd.clear (); always the whole screen or you can set what he cleans?
I I set variable into the code then she wipes all of the LCD and all bilkkar or does not come up on the LCD again
Need to clean one place because there will always leave one digit.
Is there a solution to this, is done using search and google and do nothing that could help :slight_smile:

he,he :smile: a common problem…
lcd.clear() does what it’s name says, but the easiest way is to print just spaces on required locations.

1 Like

ok :slight_smile:
figure this out and this works :slight_smile:

Here you can see Blynk app on my phone to control and see what is happening in this system :slight_smile:

2 Likes

So i guess now the hardware part and testing?