Jump to content
  • 0

read uart with logic1 in analog discovery 2


lum

Question

HI,

 

I would like to use analog discovery 2 to read the data from 2 arduino and plot the uart data acquired. I think the way to go is to use the logic1. I am trying to create a script in the software "Waveforms" which uses python. but I am not able to go through some errors.

1) do you know if there is already some examples available which does what i need?

2) at the moment I am trying to learn how to use the scripting process in AD2. I get an error when I run this line:

 

var chname=Logic.Channels.channel.name

 

what is the problem? i am expecting that this line should return then name of the channel but I get:

 

Error in: "script_logic_uart" line: 8

TypeError: Result of expression 'Logic.Channels' [undefined] is not an object.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

great tthanks for the feedback. I have seen this code in the available examples. HOwever, I think that this works only for 1 acquisition channel is correct?

I actually need to acquire two channels and based on my understanding this is not possible to do with protocol. is that correct or am I wrong?

If I am correct, this is the reason why I was thinking to use Logic not protocol.

Any suggestion?

Link to comment
Share on other sites

  • 0

HI Thank you for you feedback. I did not understand completely your answer. 

does it mean that rg[0] is the UART data acquired in DIO0 and rg[1] is the UART data acquired in DIO1?

does analog discovery associate one element of the protocol.uart.receives() array to each DIO ?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...