Tool/software: Code Composer Studio
Hello,
This is my problem statement: I want to hook up this sensor module (https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide/all) to my launchpad so that I can read the loadcell output signals as weight readings on my computer screen. I do not know how to do this.
This is what I know so far: First I connected the loadcell to the sensor module. Then I connected the sensor module to an Arduino. I uploaded the Arduino code available on the Sparkfun web link mentioned above. The library linked to this code came from github: https://github.com/bogde/HX711 . From this I can tell that the loadcell and the sensor module are working fine, as I am able to read the weights on serial monitor of the Arduino IDE. Coming to the Launchpad, I have used it successfully to control LED’s as shown in this video (https://www.youtube.com/watch?v=bcSSB_yHfoc). What is cool is that I was able to open the generated codes using Code Composer Studio and flash it onto the Launchpad and it still works! So, I am basically focusing on using Simulink’s Embedded Coder to program the Launchpad and it is working fine so far.
Here is what I tried with respect to my problem statement: Looking at the datasheet of the sensor module (http://image.dfrobot.com/image/data/SEN0160/hx711_english.pdf) I understood that I need two GPIO pins on the Launchpad to hook it up to the CLK and DOUT pins of sensor module. Additionally, I need 3.3V supply to power the module. Referring to the Launchpad user’s manual I can use GPIO pins for this purpose. I connected two jumper wires from the module’s CLK and DOUT pins to the Launchpad’s GPIO123 and GPIO2 pins respectively. After powering the module with the 3.3V pin on the Launchpad, I used the Simulink’s Embedded Coder to upload a code onto the Launchpad. Although Simulink successfully generates the code and uploads it to the launchpad, nothing happens when I apply physical force on the load cell. Attached codes that were generated using Simulink, for reference.
As far as Simulink’s Embedded Coder is concerned, I have explained this issue to Mathworks as well and I am waiting for a response from them. What I want to know from you is would it be naïve to say that the library files used in Arduino can be directly used in my Launchpad? If no, then will the library work with minor modifications?TI_C2000_trial3_ert_rtw.zip