I'm using AM2301 Temperature and Humidity sensors for my application and it runs on 1-wire communication.
May I know if ljmAsm = NET.addAssembly('LabJack.LJM') in Matlab supports 1-wire communication?
If yes, any examples that I can follow? Else, how do I script them?
Thanks
RJ
Yes, you can do 1-Wire with MATLAB (it uses the .NET interface to the LJM library), but currently there are no MATLAB examples for it. We document 1-Wire for the T7 and the register names/addresses to use (it has a register based, non-language specific example):
https://labjack.com/support/datasheets/t-series/digital-io/1-wire
The MATLAB examples demonstrate how to write and read registers. The "Basic" examples that are "Name" based are a good place to start with general usage.
Note when sending and receiving bytes, you can use the "LabJack.LJM.eWriteNameByteArray" function. Though not using the same registers and settings, the "More\I2C\I2CEeprom.m" can be helpful as it demonstrates sending/receiving bytes similar to how it is done with 1-Wire.
Can somebody show me how to convert info from datasheet
https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf
into libraries like this
https://www.avrfreaks.net/sites/default/files/forum_attachments/HX711.c
but in matlab version is much appreciated.
I'm from mechanical engineering background. If anyone here can point me more relatable hardware to software tutorials/examples will be great.
I wrote simple script with Arduino UNO just to make sure the sensors are working fine.
The serial print out are as attached. The details of the sensor start signal and data packets are as attached.
Anyone here will kind enough to have a look on my why my .cpp script worked and .m isn't.
Any reference to any similar project will back.
Regards,
RJ
P.S. It's kinda nightmare for me at the moment.
Regarding your question about the ADC and potentially a load cell, the T7 has analog inputs that can be configured as differential inputs that can interface directly with load cells. We have an application-note that may be of interest to you called bridge-circuits.