Mirandamay Posted July 30, 2018 Share Posted July 30, 2018 Hello, I am trying to send oscilloscope data from the Analog Discovery 2 to the Arduino Uno. Would there be a way I could do this so that the Arduino could read it in live time? Miranda Link to comment Share on other sites More sharing options...
attila Posted July 31, 2018 Share Posted July 31, 2018 Hi @Mirandamay You could use the WaveForms SDK. Starting with the AnalogIn_Record_int16.py or AnalogIn_Record.py example script and modifying it to send the data chunks from the record loop to the desired protocol (like COM), or using the device DIO (see Digital_Spi.py, Digital_Uart.py, Digital_I2c.py) The examples are located in the following path: C:/Program Files (x86)/Digilent/WaveFormsSDK/samples/py/ You could also send acquisition data over SPI with the WaveForms application like this: Scope1.run() while(Scope1.wait()){ var rg16 = [] var r = Scope1.Channel1.Range.value var o = Scope1.Channel1.Offset.value // convert float to 16bit integer Scope1.Channel1.alldata.forEach(function(v){ rg16.push(max(-32768, min(32767, v*32768/r+o))) }) Protocol.SPI.Start() if(!Protocol.SPI.Write(16, rg16)) break Protocol.SPI.Stop() } Link to comment Share on other sites More sharing options...
Mirandamay Posted August 1, 2018 Author Share Posted August 1, 2018 Awesome, thank you!! I will give this a try. Link to comment Share on other sites More sharing options...
Question
Mirandamay
Hello,
I am trying to send oscilloscope data from the Analog Discovery 2 to the Arduino Uno. Would there be a way I could do this so that the Arduino could read it in live time?
Miranda
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.