Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9872 Discussions

C1000 serial monitor do not show any value or read the sensor?

MRosn
Beginner
1,055 Views

Hi,

Why the code do not read the calculation I used and why the C1000 serial monitor do not show any value or read the sensor?

Right now the sensor do not give a correct reading value in Serial monitor:

# include "qm_gpio.h" /*Calling QMSI GPIO API. See section 3.1 for more details. */

# include "clk.h"

# include "qm_pinmux.h"

# include "qm_pin_functions.h"

# include "stdio.h"

# include "stdlib.h"

# include "math.h"

# define PIN 22

# define DHT_PIN_ID (QM_PIN_ID_56)

# define PIN_MUX_FN (QM_PIN_56_FN_GPIO_22)

# define DELAY 2500000

char message1[] = "Tempt = 00.0 C";

char message2[] = " RH = 00.0 %";

short Time_out;

uint8_t T_byte1, T_byte2, RH_byte1, RH_byte2, Checksum;

uint16_t Temp, RH;

//static qm_gpio_state_t state;

void start_signal()

{

qm_gpio_port_config_t cfg;

cfg.direction = 0; //cnfgre pin as o/p

qm_gpio_set_config(QM_GPIO_0, &cfg); //cnfgre pin as o/p

qm_gpio_clear_pin(QM_GPIO_0, PIN); //pin o/p LOW

QM_PUTS("O/P LOW");

clk_sys_udelay(25000); //25ms

qm_gpio_set_pin(QM_GPIO_0, PIN); // pin o/p HIGH

QM_PUTS("O/P HIGH");

clk_sys_udelay(30000); //30ms

cfg.direction = BIT(PIN); //cnfgre pin as i/p

}

signed short check_response()

{

clk_sys_udelay(40000); //40ms

//clk_sys_get_ticks_per_us;

if(!PIN) // Read and test if connection pin is low

{

clk_sys_udelay(80); //waiting till sensors starts sending data

if(PIN)

{

clk_sys_udelay(50); //just in case delay

QM_PUTS("LOW");

}

}

return 1;

}

uint8_t read_data()

<p style="font-family: intel-clear, arial, helvetica, 'helve...
0 Kudos
1 Reply
CK_Intel
Moderator
184 Views

Hello,

Thank you for reaching out to Intel® Quark™ Microcontrollers Forum.

We will be looking into this issue and get back to you shortly.

Regards

Intel Customer Support

Reply