Search found 65 matches

by Yadnik
Mon Aug 16, 2021 7:04 pm
Forum: Development of MicroPython
Topic: Status of SPI class for Zephyr port
Replies: 1
Views: 2056

Status of SPI class for Zephyr port

I am trying to take the spi class into use however I am always get the error: OSError: [Errno 22] EINVAL . I validated the Zephyr part of this, but everything seems to be well there.I also tried using another board using the zephyr port however there too I am getting same error. In the commit messag...
by Yadnik
Mon Aug 16, 2021 4:54 pm
Forum: Programs, Libraries and Tools
Topic: Zephyr port: GPS not returning values
Replies: 0
Views: 1237

Zephyr port: GPS not returning values

I am trying to get GPGGA data from the GPS on my board running the zephyr port of micropython. I am skeptical about the uart.readline() method of this port as it is not able to read the gps data.I also tried going deeper on the hardware level using a logic analyzer and everything seems to work well ...
by Yadnik
Mon Aug 16, 2021 3:20 pm
Forum: Programs, Libraries and Tools
Topic: Accelerometer not returning values
Replies: 0
Views: 1228

Accelerometer not returning values

I am using the Accel 10 click housing the LIS2DW12TR accelerometer and I want to run it using a MicroPython program.The code is as follows:https://github.com/Yadnik1/Accel10I2C/blob/main/ADXL345.py. The code prints out 0s abruptly and I am skeptical there I am making some mistake in the init functio...
by Yadnik
Fri Aug 13, 2021 7:36 pm
Forum: Programs, Libraries and Tools
Topic: Running Ultrasonic click on UART protocol
Replies: 11
Views: 5128

Re: Running Ultrasonic click on UART protocol

Thank you scruss, Even after making all the changes like this: buf0 = b'\x55\x00\x01\xFE' buf1 = b'\x55\x01\x01\xFD' buf5= b'\x55\x05\xFA' buf10=b'\x55\x0A\x26\x00\xCF' buf17=b'\x55\x11\x01\xED' buf19 =b'\x55\x13\x01\xEB' buf25 = b'\x55\x19\x88\x88\x88\x88\x88\x88b\x84\x21\x08\x42b\x10\x80\x80\x80\x...
by Yadnik
Fri Aug 13, 2021 12:56 pm
Forum: Programs, Libraries and Tools
Topic: Running Ultrasonic click on UART protocol
Replies: 11
Views: 5128

Re: Running Ultrasonic click on UART protocol

I think this what you were saying:

utime.sleep_ms(1)
uart.write(bytes(buf25))
utime.sleep_ms(1)
uart.write(bytes(buf10))
utime.sleep_ms(1)

However this also is returning only 0's, any other suggestions you have.
Thank you!!
by Yadnik
Fri Aug 13, 2021 12:53 pm
Forum: Programs, Libraries and Tools
Topic: Running Ultrasonic click on UART protocol
Replies: 11
Views: 5128

Re: Running Ultrasonic click on UART protocol

Sorry scruss,
I will only post the part of code that does not work now onwards.
by Yadnik
Thu Aug 12, 2021 12:50 pm
Forum: Programs, Libraries and Tools
Topic: Running Ultrasonic click on UART protocol
Replies: 11
Views: 5128

Re: Running Ultrasonic click on UART protocol

I tried using bytes(buf10),however that gives me an error saying SyntaxError: can't assign to expression . My code currently looks like this:https://github.com/Yadnik1/Ultrasonic-Click/blob/main/ultrasonic%20uart.py . Can you please have a look and please tell me any alternative of assigning the hex...
by Yadnik
Tue Aug 10, 2021 3:23 pm
Forum: Programs, Libraries and Tools
Topic: uart.init() method for the Zephyr port of MicroPython
Replies: 2
Views: 1740

Re: uart.init() method for the Zephyr port of MicroPython

Thanks mhelm,
I would love to.Although it is not so generic, but is there a place I can take references from or any document I can follow.
Do I just have to make changes to the machine_uart.c file?
by Yadnik
Tue Aug 10, 2021 3:21 pm
Forum: Programs, Libraries and Tools
Topic: Running Ultrasonic click on UART protocol
Replies: 11
Views: 5128

Re: Running Ultrasonic click on UART protocol

I did incorporate the changes in my code from the code : https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/910128/pga460-q1-pga460-q1-and-arduino However I am yet getting the same error i.e. my program returns only 0's Can you please have a look at my code:https://github.com/Yadnik1/U...
by Yadnik
Mon Aug 09, 2021 1:31 pm
Forum: Programs, Libraries and Tools
Topic: OSError: [Errno 22] EINVAL for SPI operation
Replies: 8
Views: 3637

Re: OSError: [Errno 22] EINVAL for SPI operation

Thank you Robert,
The output I get is as follows:
>>> dir (machine)
['__name__', 'I2C', 'Pin', 'SPI', 'Signal', 'UART', 'idle', 'reset', 'reset_cause']