Jump to content

Search the Community

Showing results for tags 'energia'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 557 results

  1. Hi! Im getting these errors: This is my main code, it just reproduces a tone: Reproductor.ino #include "Nota.h" #include "Imperial_March.h" using namespace std; #include <vector> #include <string> template class std::basic_string<char>; #define DO 261.626 #define RE 293.665 #define MIb 311.127 #define MI 329.628 #define FA 349.228 #define FAs 369.994 #define SOL 391.995 #define SOLs 415.305 #define LA 440.000 #define SIb 466.164 #define SI 493.883 #define DOM 523.251 #define DOMs 554.365 #define REM 587.330 #define MIMb 622.254 #define MIM 659.255 #define FAM 698.456 #define FAMs 739.989 #define SOLM 783.991 const int BUZZER1 = PA_7; const int BUZZER2 = PF_1; float duracion_negra = 1.0; const int NUMERO_NOTAS = 216; void setup() { // initialize the digital pin as an output. pinMode(BUZZER1, OUTPUT); pinMode(BUZZER2, OUTPUT); const float DURANCION_MINIMA = duracion_negra/4.0; Imperial_March cancion; } void loop() { float nota_a_tocar = MI; digitalWrite(BUZZER1, HIGH); // turn the signal to buzzer high digitalWrite(BUZZER2, HIGH); // turn the signal to buzzer high delayMicroseconds( 1/(2*nota_a_tocar) *1000000 ); // wait for half cycle digitalWrite(BUZZER1, LOW); // turn the signal to buzzer low digitalWrite(BUZZER2, LOW); // turn the signal to buzzer low delayMicroseconds( 1/(2*nota_a_tocar) *1000000 ); // wait for half cycle } And the class I created, is just a "song": Imperial_March.cpp #include "Imperial_March.h" #include <iostream> Imperial_March::Imperial_March() { std::string notas_aux[] = {"SOL","SOL","SOL","MIb","SIb","SOL","MIb","SIb","SOL","REM","REM","REM", //12 "MIMb","SIb","FAs","RE","SIb","SOL","SOLM","SOL","SOL","SOLM","FAMs","FAM", //24 "MIM","SOLs","DOMs","DOM","SI","SIb","MIb","FAs","MI","FA","SIb","SOL", //36 "SI","SI","SOLM","SOL","SOL","SOLM","FAMs","FAM","MIM","SOLs","DOMs","DOM", //48 "SI","SIb","MIb","FAs","MI","SI","SOL","MIb","SIb","SOL","SOL","SOL", //60 "SOL","MIb","SIb","SOL","MIb","SIb","SOL","RE","RE","RE","MIMb","SIb", //72 "FAs","RE","SIb","SOL"}; tamanio = sizeof(notas_aux)/sizeof(std::string); unsigned int i = 0; for(i=0; i<tamanio; i++) notas.push_back(notas_aux[i]); } Imperial_March::~Imperial_March(){} std::string Imperial_March::Get_nota(int pos){ return notas[pos]; } int Imperial_March::Get_tamanio(){ return tamanio; } namespace std { void __throw_length_error(char const*){} void __throw_logic_error(char const*){} //void ios_base::Init(){} } And its header Imperial_March.h #ifndef IMPERIAL_MARCH_H #define IMPERIAL_MARCH_H #include "Nota.h" #include <string> #include <vector> class Imperial_March { public: Imperial_March(); ~Imperial_March(); std::string Get_nota(int pos); int Get_tamanio(); private: std::vector<std::string> notas; int tamanio; }; #endif // IMPERIAL_MARCH_H
  2. Hello, I have MSP430FR6989 Launchpad. As per below schematic,I generate internal Vref+ voltage 1.2V on Pin P1.1. I'm successfully measure 1.19V on pin P1.1. So,This Vref I apply in NTC as per below schematic( please ignore MSP430FR4133). But I got an issue in below code: void Vref_ON() { while(REFCTL0 & REFGENBUSY); // If ref generator busy, WAIT REFCTL0 |= REFVSEL_0 + REFON + REFOUT; // Enable internal 1.2V reference while(!(REFCTL0 & REFGENRDY)); // Wait for reference generator // to settle } void Vref_Off() { REFCTL0=1; } void setup() { Vref_ON(); Serial.begin(9600); } void loop() { // int val = analogRead(A11); //**** When comment this portion then on P1.1 Vref+ get voltage (1.19V), uncomment then get voltage 0V **** Serial.println(val); delay(500); } In above code, pin P1.1 I got a 1.19V Vref+ successfully but I got an one issue on above code : Please mention comment in code. I can't understand above issue. Please give me a suggestion for issue. Thank you. Regards, Pratik
  3. I'm using ccs7.4, import Energia e18, choose blink example, use MSP-FET Flash Emulation Tool to program for IC msp430g2452. The code is working. it blink led. But take about 25second to begin running. I don't know why. i need some help.
  4. Hallo, I have ordered the MSP-EXP430FR2433 from TI. While I am waiting I have installed the MSP-EXP430FR2433 board. I opened the ASCIITable .ino in Energia and clicked the V button. I get the following errors: Energia: 1.6.10E18 (Windows XP), Board:"MSP-EXP430FR2433LP" I:\EnergiaIDE\arduino-builder -dump-prefs -logger=machine -hardware "I:\EnergiaIDE\hardware" -hardware "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages" -tools "I:\EnergiaIDE\tools-builder" -tools "I:\EnergiaIDE\hardware\tools\msp430" -tools "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages" -built-in-libraries "I:\EnergiaIDE\libraries" -libraries "I:\Energia\libraries" -fqbn=energia:msp430:MSP-EXP430FR2433LP -ide-version=10610 -build-path "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "I:\EnergiaIDE\examples\04.Communication\ASCIITable\ASCIITable.ino" I:\EnergiaIDE\arduino-builder -compile -logger=machine -hardware "I:\EnergiaIDE\hardware" -hardware "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages" -tools "I:\EnergiaIDE\tools-builder" -tools "I:\EnergiaIDE\hardware\tools\msp430" -tools "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages" -built-in-libraries "I:\EnergiaIDE\libraries" -libraries "I:\Energia\libraries" -fqbn=energia:msp430:MSP-EXP430FR2433LP -ide-version=10610 -build-path "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "I:\EnergiaIDE\examples\04.Communication\ASCIITable\ASCIITable.ino" Using board 'MSP-EXP430FR2433LP' from platform in folder: C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3 Using core 'msp430' from platform in folder: C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3 Detecting libraries used... "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/bin/msp430-g++" -c -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=msp430fr2433 -DF_CPU=8000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430FR2433LP -DENERGIA_ARCH_MSP430 -IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/include "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\cores\msp430" "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\variants\MSP-EXP430FR2433LP" "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp\sketch\ASCIITable.ino.cpp" -o "nul" "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/bin/msp430-g++" -c -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=msp430fr2433 -DF_CPU=8000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430FR2433LP -DENERGIA_ARCH_MSP430 -IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/include "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\cores\msp430" "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\variants\MSP-EXP430FR2433LP" "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp\sketch\ASCIITable.ino.cpp" -o "nul" Generating function prototypes... "C:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/bin/msp430-g++" -c -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=msp430fr2433 -DF_CPU=8000000L -DARDUINO=10610 -DENERGIA=10610 -DENERGIA_MSP_EXP430FR2433LP -DENERGIA_ARCH_MSP430 -IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/include "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\cores\msp430" "-IC:\Documents and Settings\hmjswt\Local Settings\Application Data\Energia15\packages\energia\hardware\msp430\1.0.3\variants\MSP-EXP430FR2433LP" "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp\sketch\ASCIITable.ino.cpp" -o "C:\DOCUME~1\hmjswt\LOCALS~1\Temp\build955a2213c49034f4193ce8bb7d81a022.tmp\preproc\ctags_target_for_gcc_minus_e.cpp" msp430-g++: error: and: No such file or directory msp430-g++: error: Settings\hmjswt\Local: No such file or directory msp430-g++: error: Settings\Application: No such file or directory msp430-g++: error: Data\Energia15\packages\energia\tools\msp430-gcc\4.6.5/include: No such file or directory exit status 1 Fout bij het compileren van board MSP-EXP430FR2433LP Any help? Thank you, Henk Siewert
  5. Hello my friends, I have a macbookPro with macOS highSierra and I installed the latest version of IDE energy. After that I tried to compile the basic blink example. Following error was returned: ino2cpp: error: sketch directory '{build.project_path}' doesn't exist or isn't a directory. exit status 1 Error compiling for board RED LaunchPad w/ msp432 EMT (48MHz). Can someone help me? I would like to have energia functional.
  6. Hello, I am experiencing a frustrating problem which I couldn't find an answer to anywhere online so far, I apologize if a related question was posted before and I didn't find it. I have TI MSP-EXP430G2 Launchpad with an MSP430G2452 on it and I'm trying to upload a basic program (the Blink example) with Energia. After the program has been successfully uploaded the program is not run immediately on the chip and the led doesn't start blinking. Instead there is a long delay (30sec to a few minutes) between powering the device on and the start of the execution. There don't seem to be any errors on compilation/upload. On the other hand, I have tried using Code Composer Studio instead and there the program starts running immediately without any problems. I would really appreciate if anyone has some idea what could be the problem. Thanks in advance.
  7. Hello! I m trying to run the code for the coin acceptor mechanism. its getting compiled properly on but on updation it is showing no output on serial monitor i.e serial monitor is completely blank. Since i m using Energia IDE for TM4C123gxl so i have tried the same code on Arduino IDE as well and over there it is giving the exact output as i want. and all the things are correctly selected ie the port, board and everything. What could be the problem? Code.txt
  8. Ssherry


    I am working on code related to sending an email through cc3100booster and msp432p401r. I am having an issue in connectivity of wifi in the module when the wifi connection code is provided in void setup(). I am providing mobile's hotspot and it gets connected and disconnected periodically. I require an continuous connection. When the wifi connection code is written inside loop(), the connection problem is solved but a newer issue is arised i,e, the program is running for email but not for the server [In server program i am sending temperature and pulse count value to thingspeak.com to get a graphical representation of my data.] moreover, despite of being present in loop, it executes only once. its a complete arcane issue for me. I am linking code below. please help me out with this. #define TEMBOO_ACCOUNT "xxxxxxx" // your Temboo account name #define TEMBOO_APP_KEY_NAME "xxxxxxx" // your Temboo app name #define TEMBOO_APP_KEY "xxxxxxxx" // your Temboo app key #define WIFI_SSID "xxxxxx" //hotspot name #define WIFI_PASSWORD "xxxxxxx" //hotspot password #ifndef __CC3200R1M1RGC__ #include <SPI.h> #include <WiFi.h> #include <WiFiClient.h> #include <Temboo.h> #endif const String GMAIL_USER_NAME = "xxxxxxx"; //sender's email const String GMAIL_APP_PASSWORD = "xxxxxx"; //sender's app password const String TO_EMAIL_ADDRESS = "xxxxxxx"; //receiver's email boolean attempted = false; #include <LiquidCrystal.h> LiquidCrystal lcd(13,33,12,24,5,25,6,26,27,8,28); float temp; float volt; int sensorValue1; int sensorValue2; int count; WiFiClient client; char server[] = "api.thingspeak.com"; unsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds const unsigned long postingInterval = 10L * 1000L; // delay between updates, in milliseconds void checkconnection() { int wifiStatus = WL_IDLE_STATUS; // determine if the WiFi Shield is present. Serial.print("\n\nShield:"); if (WiFi.status() == WL_NO_SHIELD) { Serial.println("FAIL"); // if there's no WiFi shield, stop here. while(true); } while(wifiStatus != WL_CONNECTED) { Serial.print("WiFi:"); wifiStatus = WiFi.begin(WIFI_SSID, WIFI_PASSWORD); if (wifiStatus == WL_CONNECTED) { Serial.println("OK"); } else { Serial.println("FAIL"); } delay(1000); } Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for an ip addresss Serial.print("."); delay(300); } Serial.println("\nIP Address obtained"); // We are connected and have an IP address. // Print the WiFi status. printWifiStatus(); } void serverprog() { while (client.available()) { char c = client.read(); Serial.write(c); } if (millis() - lastConnectionTime > postingInterval) { httpRequest(); } } void httpRequest() { // close any connection before send a new request. // This will free the socket on the WiFi shield client.stop(); // if there's a successful connection: if (client.connect(server, 80)) { Serial.println("connecting..."); char msgg[200]; sprintf(msgg,"GET /update?api_key=xxxxxxxxxxxxxxxx&field1=%f&field2=%d",temp,count); //have to make account on thingspeak.com and create channel then create 2 fields. then copy the WRITE API key in place of xxxxxxxxx // send the HTTP PUT request: client.println(msgg); client.println("Host: api.thingspeak.com"); client.println("User-Agent: Energia/1.1"); client.println("Connection: close"); client.println(); // note the time that the connection was made: lastConnectionTime = millis(); } else { // if you couldn't make a connection: Serial.println("connection failed"); } } void printWifiStatus() { // print the SSID of the network you're attached to: Serial.print("SSID: "); Serial.println(WiFi.SSID()); // print your WiFi IP address: IPAddress ip = WiFi.localIP(); Serial.print("IP Address: "); Serial.println(ip); // print the received signal strength: long rssi = WiFi.RSSI(); Serial.print("signal strength (RSSI):"); Serial.print(rssi); Serial.println(" dBm"); } void setup() { lcd.begin(16, 2); Serial.begin(9600); Serial.println("processing......"); } void loop() { int sensorValue1 = analogRead(A0); lcd.clear(); lcd.setCursor(0,2); lcd.print("wait.."); /* lcd.setCursor(0,0); lcd.print("temperature ="); lcd.setCursor(14,0); lcd.print(temp);*/ Serial.println(sensorValue1); volt=sensorValue1*3.22; temp=volt/10; Serial.println(volt); Serial.println("temp="); Serial.println(temp); delay(10); int sensorValue2; unsigned long start=millis(); analogReadResolution(10); unsigned long currentValue; float x=0; int y; count=0; delay(3000); lcd.clear(); lcd.setCursor(0,2); lcd.print("detecting......."); do { int sensorValue2 = analogRead(A1); if(sensorValue2 > x) { x=sensorValue2; y=1; } else if(sensorValue2 < x) { x=sensorValue2; if(y==1) { count++; y=0; } } currentValue=millis(); } while(currentValue-start<=30000); count=(count*2)/10000; lcd.clear(); lcd.setCursor(0,0); lcd.print("temperature ="); lcd.setCursor(14,0); lcd.print(temp); lcd.setCursor(0,2); lcd.print("pulse count ="); lcd.setCursor(14,1); lcd.print(count); delay(1000); Serial.println(sensorValue2); Serial.println("pulse count="); Serial.println(count); checkconnection(); delay(3000); if (!attempted) { Serial.println("Running SendAnEmail..."); TembooChoreo SendEmailChoreo(client); SendEmailChoreo.begin(); SendEmailChoreo.setAccountName(TEMBOO_ACCOUNT); SendEmailChoreo.setAppKeyName(TEMBOO_APP_KEY_NAME); SendEmailChoreo.setAppKey(TEMBOO_APP_KEY); SendEmailChoreo.setChoreo("/Library/Google/Gmail/SendEmail"); SendEmailChoreo.addInput("Username", GMAIL_USER_NAME); SendEmailChoreo.addInput("Password", GMAIL_APP_PASSWORD); SendEmailChoreo.addInput("ToAddress", TO_EMAIL_ADDRESS); SendEmailChoreo.addInput("Subject", "Recieved An Email???"); char msg[100]; sprintf (msg," Body Temperature=%f, Pulse count=%d",temp,count); SendEmailChoreo.addInput("MessageBody", msg); unsigned int returnCode = SendEmailChoreo.run(); if (returnCode == 0) { Serial.println("Success! Email sent!"); } else { while (SendEmailChoreo.available()) { char c = SendEmailChoreo.read(); Serial.print(c); } } SendEmailChoreo.close(); } serverprog(); lcd.clear(); }
  9. Hello, I'm using energia 1.6.10E18 with the launchpad MSP430G2 and the MSPG2553 installed. So I saw that in another forum the library from cactus.io was used for the BME280. That library was for the I2C. Now I want to use the SPI library and they had one.(http://cactus.io/hookups/sensors/barometric/bme280/hookup-arduino-to-bme280-barometric-pressure-sensor-spi). So I installed the library changed it to hardware SPI with the cs pin on P2_1. And it compiled, but i'm only getting these results: 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F 813.81 mb 100.00 % 0.00 *C 32.00 *F It looks like the msp430 is not getting any data in/out. I probed the SPI connections with my oscilloscope en there is literally nothing happening. While with the basic example sketch I can clearly see what code is sending. Can anyone help me understand this problem and hopefully fix this. I want the SPI connection to work because I want the nrf24l01 and BME280 working side by side. The msp430 can't do SPI and I2C together like an arduino so you need to chose between them. This is the code I'm using and the library on the website. #include <SPI.h> #include "cactus_io_BME280_SPI.h" #define BME_CS P2_1 BME280_SPI bme(P2_1); void setup() { Serial.begin(9600); Serial.println("Bosch BME280 Pressure - Humidity - Temp Sensor | cactus.io"); if (!bme.begin()) { Serial.println("Could not find a valid BME280 sensor, check wiring!"); while (1); } Serial.println("Pressure\tHumdity\t\tTemp\ttTemp"); } void loop() { bme.readSensor(); Serial.print(bme.getPressure_MB()); Serial.print(" mb\t"); // Pressure in millibars Serial.print(bme.getHumidity()); Serial.print(" %\t\t"); Serial.print(bme.getTemperature_C()); Serial.print(" *C\t"); Serial.print(bme.getTemperature_F()); Serial.println(" *F"); // Add a 2 second delay. delay(1000); //just here to slow down the output. }
  10. I'm porting my compact Lisp interpreter, uLisp, to the MSP430FR5994 LaunchPad, and would like to provide SD card support. I've already got code working with AVR chips using the Arduino SD library. Is there a port of this to Energia, or something similar? Thanks, David
  11. Hello, I want to connect cc3220 to firebase database. Earlier I was using Esp8266 with firebase-arduino library but Energia do not support this library. How can it be done on cc3200?
  12. This is a fun project that was created for my embedded systems class at John Brown University that allows you to create your own quiz wizard similar to the jeopardy game show system. The main portion of this code is run on an MSP430F5529 launchpad, and nRF24L01 transceiver modules were used to obtain the wireless functionality. It makes use of the Enrf24.h library to operate the transceiver modules, and the user interface is output to the serial monitor of the energia IDE. Four buttons wired into the MSP430F5529 then allow the user to interact with the system. The wireless module was created by using an MSP430G2553 launchpad, button, and LED for indicating power on. The LCD display can be integrated although an Arduino MEGA is needed to have it be fully functional with the rest of the system, so the code for this portion of the project was not uploaded. Enrf24_RXdemo.ino Enrf24_TXdemo.ino Rough Circuit Schematic.pdf
  13. Hi All, I am new to msp430 world, so far i have done many projects with mbed (LPC1768,KL25Z and K64F). I liked mbed as it is so easy to use, however to make cost efficent and low power products i am now trying to learn msp430. I want to interface msp430g2553 with cc1101 transceivers. I have done the basic communication using mbed(like sending and receiving data). However I need some help with msp430. I want to use msp430 as transmitter first and receive data on mbed-lpc1768. I have converted the mbed library to msp430(changed syntax where required) and managed to compile it with no errors. However when i am calling send function it is not sending data, can anyone tell me how to set frequency to 1MHz. do I need to divide by 16 in set clock more or with 4. Anyone who has done similar project in energia please provide some assistance. thanks in advance, Zain
  14. I am trying to interface GY-80 (only adxl345) to TM4C1294XL board using Energia. But outputs comes out to be 0. And also there comes this error "Failed to load dynamic library: 'ftd2xx.dll' " while uploading but the code gets uploaded successfully. I am pasting the code below, can somebody tell me where i am doing it wrong? #include "Wire.h" #define Power_Register 0x2D #define BW_rate 0x2C #define Int_enable 0x2E #define dataFormat 0x31 #define X_Axis_Register_DATAX0 0x32 #define X_Axis_Register_DATAX1 0x33 #define Y_Axis_Register_DATAY0 0x34 #define Y_Axis_Register_DATAY1 0x35 #define Z_Axis_Register_DATAZ0 0x36 #define Z_Axis_Register_DATAZ1 0x37 #define fifoCntrl 0x38 int ADXAddress = 0x53; int X0,X1,X_out; int Y0,Y1,Y_out; int Z1,Z0,Z_out; float Xa,Ya,Za; void setup() { Wire.setModule(0); Wire.begin(ADXAddress); Serial.begin(115200); delay(100); Wire.beginTransmission(ADXAddress); Wire.write(Power_Register); Wire.write(8); Wire.write(BW_rate); Wire.write(10); Wire.write(dataFormat); Wire.write(11); Wire.write(fifoCntrl); Wire.write(0); Wire.endTransmission(); } void loop() { Wire.beginTransmission(ADXAddress); Wire.write(X_Axis_Register_DATAX0); Wire.write(X_Axis_Register_DATAX1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1=X1<<8; X_out =X0+X1; } Wire.beginTransmission(ADXAddress); Wire.write(Y_Axis_Register_DATAY0); Wire.write(Y_Axis_Register_DATAY1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1=Y1<<8; Y_out =Y0+Y1; } Wire.beginTransmission(ADXAddress); Wire.write(Z_Axis_Register_DATAZ0); Wire.write(Z_Axis_Register_DATAZ1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1=Z1<<8; Z_out =Z0+Z1; } Serial.print("Xa= "); Serial.print(Xa);Serial.print("\t"); Serial.print("Ya= "); Serial.print(Ya);Serial.print("\t"); Serial.print("Za= "); Serial.println(Za); delay(1000); Serial.println(); }
  15. Hi Guys I have some troubles with launchpad F28377D. I know that some boards C2000 Delfino are sopported on Energia IDE, buy I want to ask if ¿Is there a way to connect LaunchPad F28379D on Energia IDE?. I ran son examples on F28377S and it is fine. Thank you for your comments, and I hope that somebody can help me.
  16. I am trying to use Energia with the MSP-EXP432P401R, but I am unable to install the right LaunchPad board on Energia. I downloaded the proper driver using http://energia.nu/guide/guide_windows/ and downloaded Energia for Windows using http://energia.nu/download/. As a point of reference, my computer is Windows 64 bit. I then used http://energia.nu/guide/boards/ to install the right LaunchPad board, but I am receiving the following error message shown below. I tried all troubleshooting suggestions on the links provided, but I can’t seem to find a solution to my problem. I did see after I connected the USB to the LaunchPad, the green LED did come on. Can you help me determine the cause of this and help me resolve it?
  17. Hi Guys, I just writing code using Energia format on CCS 8. I want to set the timer Interrupt on 1 Mhz frequency. But as I check using Osiloscope, it just shown 53.8 Khz. Please kindly advise to fix my code as below. I appreciate your help. Regards, Lukman #include <msp430.h> const int ledPin2 = 39; void setup() { // put your setup code here, to run once: pinMode(ledPin2,OUTPUT); setupTimer(1); // set timer period to 1000 micro seconds } void loop() { } void OnTimer() { static int msCount=0; static int state=0; // Remember LED state for toggling purposes msCount++; if (msCount >=1)//// Count 1000 milliseconds to allow a 1 second pulse { msCount = 0; digitalWrite(ledPin2,state); // Write to Green LED state=~state; // toggle state } } void setupTimer(unsigned Period) { WDTCTL = WDTPW | WDTHOLD; // Stop WDT // Configure one FRAM waitstate as required by the device datasheet for MCLK // operation beyond 8MHz _before_ configuring the clock system. FRCTL0 = FRCTLPW | NWAITS_1; // Clock System Setup CSCTL0_H = CSKEY >> 8; // Unlock CS registers CSCTL1 = DCOFSEL_4 | DCORSEL; // Set DCO to 16MHz CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK; // Set SMCLK = MCLK = DCO, // ACLK = VLOCLK CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1; // Set all dividers CSCTL0_H = 0; // Lock CS registers // Configuration word // Bits 15-10: Unused // Bits 9-8: Clock source select: set to SMCLK (16MHz) // Bits 7-6: Input divider: set to 8 // Bits 5-4: Mode control: Count up to TACCRO and reset // Bit 3: Unused // Bits 2: TA0CLR : set to initially clear timer system // Bit 1: Enable interrupts from TA0 // Bit 0: Interrupt (pending) flag : set to zero (initially) //TA0CTL=0b0000001001010010;// Bits 7-6: Input divider: set to 8 TA0CTL=0b0000001000010110;// Bits 7-6: Input divider: set to 1 TA0CCR0=Period*1; TA0CCTL0=BIT4; // Enable interrupts when TAR = TACCR0 } // The address function that follows this vector statement is placed in the specified location Interrupt Vector table #pragma vector=TIMER0_A0_VECTOR __interrupt void timerA0ISR(void) { // Timer A0 Interrupt service routine OnTimer(); TA0CTL &= ~BIT0; // Acknowledge the interrupt }
  18. Hi, I have a project that I can run when using the Energia IDE, and it runs well. However i was trying to us the Visual Studio IDE so that i could keep the project beside a PC app which interfaces to it via UART. My problem is the compilation error "the system cannot find the file specified". Im using Energia 1.6 through VMicro with the RED Lauchpad w/ msp432 EMT (48MHz) MSP- EXP432P401R REV 2.1 VISUAL STUDIO 2017 WINDOWS 10 vMicro Energia 1.6 I have the correct com port selected, and it compiles until this point :- " Using library Wire version 1.0.1 in folder file:///C:/Users/McintoS/AppData/Local/Energia15/packages/energia/hardware/msp432r/5.6.1/libraries/Wire recipe.hooks.sketch.prebuild.1.pattern "java" "-jar" "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2/ino2cpp.jar" -o "C:\Users\McintoS\AppData\Local\Temp\VMBuilds\Main_msp432\energia_MSP-EXP432P401RR\Release/" -T "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2/templates/Variables.mk.template" -r "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2" -n Main_msp432.ino "C:\Energia\projects\Main_msp432" msp432:MSP_EXP432P401R" Process: "java" "-jar" "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2/ino2cpp.jar" -o "C:\Users\McintoS\AppData\Local\Temp\VMBuilds\Main_msp432\energia_MSP-EXP432P401RR\Release/" -T "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2/templates/Variables.mk.template" -r "C:\Users\McintoS\AppData\Local\Energia15\packages\energia\tools\ino2cpp\1.0.2" -n Main_msp432.ino "C:\Energia\projects\Main_msp432" msp432:MSP_EXP432P401R" The system cannot find the file specified " any ideas on how to fix this would be greatly appreciated. Thank you.
  19. Hello, Pardon for my direct approach. I saw an example in Energia forum on Problem Sampling Rate MSP430F5529 May I know what is readADC();? Because you do not create any void called readADC(); on your sample code. For right now I am trying implement it on MSP430F6989LP, which also has 12bit ADC. Would you kind share with me? I appreciate your help. Thank you very much. Best Regards, Lukman your example code is as below: #if defined(__MSP430_HAS_ADC12_PLUS__) #define REFV_MAP(x) ((x>>8) & 0x70) #define REF_MAP(x) (x & 0xB1) #define ADCxMEM0 ADC12MEM0 #define DEFAULT_READ_RESOLUTION 12 #endif #if defined(__MSP430_HAS_ADC12_PLUS__) #define DEFAULT (ADC12SREF_0 << 8) #define INTERNAL1V5 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_0) #define INTERNAL2V0 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_1) #define INTERNAL2V5 ((ADC12SREF_1 << 8) | REFON | REFMSTR | REFVSEL_2) #define EXTERNAL (ADC12SREF_2 << 8)#endifuint16_t analog_reference = DEFAULT; #define NUM_READS 10000 void setup() { Serial.begin(115200); Serial.println("Setup done"); setupADC(A0); } uint32_t mark, time_it_took; uint16_t i; void loop() { // Serial.println(readADC()); mark = millis(); for(i = 0; i < NUM_READS; i++) { readADC(); } Serial.print("Time: "); Serial.println(millis() - mark); Serial.println(readADC()); } uint16_t setupADC(uint8_t pin) { uint8_t channel; // Check if pin is a special analog pin (A10 = temp sensor, A11 = Vcc/2, etc.) if (pin >= 128) channel = pin - 128; else channel = digitalPinToADCIn(pin); // Check if pin is valid if (pin == NOT_ON_ADC) return 0; #if defined(__MSP430_HAS_ADC12_PLUS__) ADC12CTL0 &= ~ADC12ENC; // disable ADC ADC12CTL1 = ADC12SSEL_2 | ADC12DIV_0; // ADC12OSC as ADC12CLK (~5MHz) / 5 while (REFCTL0 & REFGENBUSY); // If ref generator busy, WAIT if (pin == TEMPSENSOR) {// if Temp Sensor REFCTL0 = REF_MAP(INTERNAL1V5); // Set reference to internal 1.5V ADC12MCTL0 = channel | REFV_MAP(INTERNAL1V5); // set channel and reference } else { REFCTL0 = REF_MAP(analog_reference); // Set reference using masking off the SREF bits. See Energia.h. ADC12MCTL0 = channel | REFV_MAP(analog_reference); // set channel and reference } ADC12CTL0 = ADC12ON | ADC12SHT0_4; // turn ADC ON; sample + hold @ 64
  20. Hello Guys Good Day for All, I just open the Mspflash example from energia example using MSP4305969LP board. But when I compile, it show error as below picture. Any one can help me? Thanks a lot. Best Regards, Lukman
  21. Hello Guys, Good Day for All. May I ask whether there any library or function for using Timer in energia as in arduino? For example if in arduino we can use Timer1.attachInterrupt() I appreciate your help. Best Regards, Lukman
  22. How to program rtc tm4c123gxl in energia? Please provide energia code for rtc in tm4c123. As i am using energia compiler for my project i want some help to program rtc with controller
  23. Is it possible to use PIN 3 & 4 in MSP-EXP430G2 board for UART and ADC read simultaneously in same project. I am worry about the impact on ADC value.
  24. I'm using Rei Vilo's RTC Library: https://github.com/rei-vilo/DateTime_Library Under Code Composer 7.4 / Energia 18 / MSP432 Red Board 4.9.1 this library compiles works fine. When I switched to Code Composer 8.0 / Energia 18 / MSP432 Red Board 5.6.1, "strptime" seems to have disappeared. Anyone have any ideas on what happened? Libraries/RTC/subdir_rules.mk:9: recipe for target 'Libraries/RTC/RTC_Library.o' failed ../Libraries/RTC/RTC_Library.cpp: In function 'uint8_t convertString2DateTime(String, String, tm&)': ../Libraries/RTC/RTC_Library.cpp:88:59: error: 'strptime' was not declared in this scope if (strptime(charDateTime, charFormat, &_timeStructure) == NULL) ^ thx. jrd
  25. I am working with the MSP430F5529 Launchpad w/the Pervasive Display Gen2 EXT2 board and various eInk displays (BW, BWR). There seems to be a wide array of official(?) and unofficial SDKs, FW dev kits, boosterpacks, etc. available with varying degrees of compatibility with this particular LaunchPad. I am looking for some basic pointers on creating a simple GUI tool for sending images to the display. I can compile the latest 1.21 FW (via CCS using PDI Apps as target), flash the FW and run the (precompiled) PDI Apps Ver 1.21.exe GUI tool to send images to display, however it seems there is no source code for this GUI tool provided(?). Or, am I just not looking in the right place? Is there a project and/or document that explains/demonstrates creating a simple GUI or command line to interface with the hardware (for example making calls to the PDI_apps_drivers command handlers) to send an image to the display. So far I have found two projects which seem to have potential for good starting point(?): CCS IDE and EPD Extension Board Gen2 (EXT2)_v1.21 using the PDI Apps target _preferable_ (or the MSP430F5529 specific example target). Energia IDE (or Visual Micro MSVS plugin) and EPD_Demo.ino with the Pervasive_EPD_BoosterPack2 (I'd prefer to use C++, but not completely opposed to python if necessary as starting point.) Thanks for any pointers in the right direction.
  • Create New...