Need help explain analog temperature block code

Hi,

I have no experience for any programming. I try to run a simple block code for my analog sensor temperature Arduino KY-013 on Parallax board. I keep getting zero value on the graph of my block program. Can someone explain how this block code "A/D Channel A0 read (0-5V) in volt-100ths" means and how to get the temperature value. Thank you.

My block code is exactly like this youtube video "Tiny Tutorials: Graphing a Single Channel in BlocklyProp" the difference is only the sensor.

Comments

  • Welcome to the world of BlocklyProp.

    In order to help you, I have a few questions:

    Which Parallax board are you using?
    There are 3 connections to the KY-013 module, where did you connect these 3 connections?
    If you indeed are getting only 0's, it sounds like the KY-013 may not be powered-up or is connected wrong. If you remove the connection from the A/D A0 port, you should see a floating voltage value returned by the A/D, if you don't then?

    The BlocklyProp project code in the Video is using the Propeller Activity Board, if you are using a different board, did you select the correct board when you started your BlocklyProp project?

    The BlocklyProp project needs to match the board you are using in order to know where the A/D hardware is connected (or even available).

    In order to turn the voltage measurement the A/D hardware will get from the KY-013 module into a temperature value, you will need do some math calculations. This link goes the module's web page, which contains a C code example with some information on the math involved. Of course this may not help you too much since you say you don't have much programming experience.

    I hope this helps...
  • On the back of the board it writes "Propeller Board of Education 32900" .
    Starting from my left hand, I have pin1 to ground, pin2 to power and pin3 to signal AD0. Even thought I switch these pins around, it still gives zero value.
    What I see is that it starts to blink blue a few times for (Serial Tx) and then solid red for (Serial Rx).

    When I removed the connection from the A/D port, I still get zero value.

    I think I might have used the wrong board or maybe the sensor is broken. I will have the Arduino board for next few days so I will play this sensor with that board.

    Thank you for reply.

  • Switcing pins around is one of the most effective ways there is to destroy a circuit.
  • Will be careful next time. Thank you for letting me know.
  • Naruko wrote: »
    On the back of the board it writes "Propeller Board of Education 32900" .
    Starting from my left hand, I have pin1 to ground, pin2 to power and pin3 to signal AD0. Even thought I switch these pins around, it still gives zero value.
    What I see is that it starts to blink blue a few times for (Serial Tx) and then solid red for (Serial Rx).

    When I removed the connection from the A/D port, I still get zero value.

    I think I might have used the wrong board or maybe the sensor is broken. I will have the Arduino board for next few days so I will play this sensor with that board.

    Thank you for reply.

    I don't think BlocklyProp knows how to access the ADC (Analog-to-Digital) I2C hardware on the Propeller Board of Education(BOE). The ADC integrated circuit(AD7993-1) is different on the BOE than the ones (MCP3*, AD0831) listed as supported in BlocklyProp. So this is why I believe you are not getting any meaningful voltage measurements using the A/D chip read block.

    So unfortunately you will not be able to read your Adafruit KY-013 module using the Propeller BOE built-in ADC hardware. So your best bet would be either getting a Propeller-Activity-Board or adding a BlocklyProp known ADC integrated circuit into the breadboard on the BOE or use the Arduino board you have...
  • Thank you for your help and all the information.

Sign In or Register to comment.