![]() The structure would look like this: struct meter_lookup ", 60, PRIVATE, NO_ACK) // NOTE Added NO-ACK to save data. ![]() float flow = map(adc, omLow, omHigh, meters.toLow, meters.toHigh) Now, you simply use the value of “dip” to get key values for equations from a lookup table (an array of structures for example) and use those in a single formula. Let’s assume you go with two switches or jumper or whatever acts like a switch. With 3 switches you get 8 configurations and so on. So with two switches you can select 4 configurations. Thank with each dip switch associated with a pin, you can simply treat the switches as binary value: dip = 0 I was not able to find anything yet but I may have missed it. If someone already did this please link me to the post. I would have other sizes so the smaller unit would be dip switch 1 and the code obviously more complicated than this but her is a general idea.įloat flow = map(adc,1000.0, 8000.0, 0.0, 40.0) įloat flow = map(adc,2139.0, 10614.0, 0.0, 200.0) Īny help or suggestions is appreciated. Lets say that would be for a one inch meter with a flow of 0 to 200. This has LogicWorks4 - t written on its title bar. ![]() The window on the top left of the screen is called the design window. Start LogicWorks 4 by selecting it from the Start menu. I would use a 4 to 5 channel dip switch but not sure what pins to write those too as well as if they should be set to high or low… or if this will even work. This tutorial will show you how quickly you can create and test a circuit using LogicWorks. Instead of having different code with each size meter I want to have a dip switch that can be selected to tell my particle code which formula to use base on which dip switch is selected. They will each have a different flow rate, and reading scale. Can I wire a dip switch on my board that will tell my particle device what formula/part of the code to run?Įxample. I hope this is the right place to post this question.Īs I move forward with my project and design I came up with the following question.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |