From 50a3989e98bad9ca45e44592b4373f4d5a4edd53 Mon Sep 17 00:00:00 2001 From: Peter McGoron Date: Wed, 13 Jul 2022 12:30:36 -0400 Subject: [PATCH] i broke the PMOD connectors by driving them 5V lol --- software/src/main.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/software/src/main.c b/software/src/main.c index 032fa68..5e1f13d 100644 --- a/software/src/main.c +++ b/software/src/main.c @@ -6,18 +6,15 @@ void main(void) { - uint32_t out_pins = 0; - uint32_t in_pin; - + uint32_t v = 0; + uint32_t r = 0; LOG_PRINTK("hello, world\n"); for (;;) { k_sleep(K_MSEC(1000)); - *dac_ctrl[0] = out_pins; - out_pins++; - if (out_pins == 7) - out_pins = 0; - in_pin = *dac_miso[0]; + *adc_conv[0] = v; + v = !v; + r = *adc_sdo[0]; - LOG_PRINTK("out: %d; in: %d\n", out_pins, in_pin); + LOG_PRINTK("out: %d; in: %d\n", v, r); } }