×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Indi duino and sensors

  • Posts: 33
  • Thank you received: 4
Hello Guys
I would preciate if someone could give me some clues about using sensors with indi duino driver.
Currently I have successfully connected and used power relays but I am stuck at next step - temperature sensors. I have two for testing purposes - DHT22 and DS1820. I have successfully used both alone with arduino and some simple arduino sketch so i can safely assume that both seem to work properly. I can not however get them to work with StandardFirmata arduino firmware and indi duino driver. I get no readings at all.
Should there be any changes made in StandardFirmata firmware code/sketch for arduino? How should skeleton definition look like for such sensor?
If it does make any difference my arduino is connected to Raspberry Pi where I run indiserver.

Here the part of skeleton file which I have been trying to use so far for this sensors
<defNumberVector device="Arduino" name="TEMP" label="Temp2" group="Main Control" state="Idle" perm="ro" timeout="0">
    <defNumber name="TEMP" label="TEMP" format="%4.0f" min="0" max="255" step="1">
    <indiduino pin="2" type="input" mul="0.1" add="-150"/>
0
    </defNumber>
</defNumberVector>
Last edit: 6 years 1 month ago by Krzysztof.
6 years 1 month ago #10989

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic Indi duino and sensors

Well I have no experience at all with Arduino, but it seems to me that from above that:

Temperature = Pin2_Value * 0.1 - 150

So is your sensor attached to Pin 2?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
Last edit: 6 years 1 month ago by Jasem Mutlaq.
6 years 1 month ago #11008

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 4

Replied by Krzysztof on topic Indi duino and sensors

Yes, sensor is attached to pin 2. (Data channel ofcourse)
6 years 1 month ago #11011

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic Indi duino and sensors

And what its value range? If you use any other program to read it, what are the data range there?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
6 years 1 month ago #11012

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 4

Replied by Krzysztof on topic Indi duino and sensors

I have used arduino sketch/code from examples included in arduino-ide (or did I download it additionaly? Can't remember to be honest) to test both (different for each one). Both sketches did include some additional libraries which give functions that allow You just to read temperature value and not "some value" that You have to recalculate to get actual temperature value. Although if I would get "some value" with indi_duino than that would be something, currently all I see is constant "0" no matter which one I use.
I am trying to understand how does it all work with firmata and indi_duino so currently I am thinking that this might be the problem - both of the sensors which I have are digital, one works on OneWire bus and second on I2C bus (Here I am not sure if firmata code can distinguish that and use proper). From what I understand You do not just read value from these sensors and recalculate it. You have to query them with kind of sequenced signal to get response / read out.
Maybe I should look around for some simple analog sensor and try it? Simple thermistor or something like that...
From the other side in indiduino Meteostation there is exactly the same sensor which I have - DHT22 so there must be a way to make it work I suppose. I just don't know where to look to find out how to configure it all properly... there is not much information how it should be done.
I hope You understand my descriptions, i am really green in this matter.
Last edit: 6 years 1 month ago by Krzysztof.
6 years 1 month ago #11015

Please Log in or Create an account to join the conversation.

Time to create page: 0.445 seconds