Jump to content

professorpacs

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Another variety of the test routine, this time on the F5529 Launchpad. appears to be off by a factor of 2. (5000 is not the right value for the 'map' function?) #include "Energia.h" #define ANALOG_HALFVCC_INPUT 11 void setup() { // start with the 2.5V internal reference analogReference(INTERNAL2V5); Serial.begin(115200); // msp430f5529 Launchpad } // returns VCC in millivolts int getVCC() { int rawdata = analogRead(ANALOG_HALFVCC_INPUT); int data = (int)map(rawdata, 0, 4096, 0, 5000); // Modified for ADC12_A Serial.print("ADC12_A Value: 0x"); Serial.print(rawdata, HEX); Serial.print("\t VCC: "); Serial.println (data, DEC); Serial.print("ADC12REF2_5V: 0x"); Serial.println(ADC12REF2_5V, HEX); Serial.print("ADC12CTL0: 0x"); Serial.println(ADC12CTL0, HEX); Serial.println("---end of ADC CH11 read---"); return 0; } void loop() { int data = getVCC(); delay(1000); } /* --sample output -- ADC12_A Value: 0x7FF VCC: 2498 ADC12REF2_5V: 0x40 ADC12CTL0: 0x412 ---end of ADC CH11 read--- ADC12_A Value: 0x7FF VCC: 2498 ADC12REF2_5V: 0x40 ADC12CTL0: 0x412 ---end of ADC CH11 read--- ADC12_A Value: 0x7FF VCC: 2498 ADC12REF2_5V: 0x40 ADC12CTL0: 0x412 ---end of ADC CH11 read--- */
  2. Perhaps someone could post a manifest or directory tree of a successful build on 64-bit Linux? The packaged version of 0011 works, but the source from Github yields the following: linux64-build: [copy] Copying 1 file to /home/user/src/Energia/build/linux/work/lib [exec] tar (child): ../../msp430_tools_linux64.tar.bz2: Cannot open: No such file or directory [exec] tar (child): Error is not recoverable: exiting now [exec] tar: Child returned status 2 [exec] tar: Error is not recoverable: exiting now [exec] Result: 2 [exec] tar (child): ../../lm4f_tools_linux64.tar.bz2: Cannot open: No such file or directory [exec] tar (child): Error is not recoverable: exiting now [exec] tar: Child returned status 2 [exec] tar: Error is not recoverable: exiting now [exec] Result: 2 linux-dist: [echo] [echo] ======================================================= [echo] Energia for Linux was built. Grab the archive from [echo] [echo] build/linux/energia-0101E0011-linux.tgz [echo] ======================================================= [echo] linux64-dist: BUILD SUCCESSFUL
×
×
  • Create New...