Quantcast
Channel: MSP430 Technical Forums
Viewing all 2077 articles
Browse latest View live

Trouble with DHT11 Library (MSP430G2553)

$
0
0

Hey guys,

I am trying to work with this library: http://forum.43oh.com/topic/2239-solved-dht22-temp-rh-one-wire-sensor-on-energia/?p=19474

 

To my knowledge, everything is configured correctly. I have confirmed that the device does work fine on an Arduino Uno with this resistor, 10k. I have also confirmed that it works with a 4.7k. It also works with both 3.3v and 5v.

 

However, on the MSP430, using the above library (stock) the values I am getting are very wrong, for example:

debug 	bits received 	40
debug 	27, 0, 11, 0, 38 =? 38
debug 	 checksum 	ok
debug 	RH% 	9984
debug 	oC 	4352
RH% 	998.4 %	
oC 	435.2 *C

This is in a room ~62F % 40% RH. If I touch or blow on the sensor the values change as you would imagine, so I know that it is reading something and reporting changes properly. I have looked through the code and nothing glaringly obvious sticks out at me. I know I could measure a few reference values and add in a few calculations to adjust the output, but I would rather fix the root of the issue. I understand the library was written for the DHT22 and I am using the DHT11, but they should be drop-in replacements for one another, the DHT22 just being more sensitive. Again, I have used this unit with a DHT22 library on Arduino.

 

I would greatly appreciate any help! I have researched this for a while but have found nothing - it's possible that I'm just not using the right terms, however.

 

Thank you!


Trouble with BH1750 (Tiva C-Lm4f123gxl)

$
0
0
#include <Wire.h> //BH1750 IIC Mode 
#include <math.h> 
int BH1750address = 0x23; //setting i2c address
uint16_t val=0;


byte buff[2];
void setup()
{
  Wire.begin();
  Serial.begin(9600);//init Serail band rate
}

void loop()
{
  
  int i;
  val=0;
  BH1750_Init(BH1750address);
  delay(200);

  if(2==BH1750_Read(BH1750address))
  {
    val=((buff[0]<<8)|buff[1])/1.2;
    Serial.print(val,DEC);     
    Serial.println("[lx]"); 
  }

}

   
int BH1750_Read(int address) 
{
  int i=0;
  Wire.beginTransmission(address);
  Wire.requestFrom(address, 2 );
  while(Wire.available()) 
  {
    buff[i] = Wire.read();  // receive one byte
    i++;
  }  
  
  Wire.endTransmission(); 
  return i;
}
  

void BH1750_Init(int address) 
{
  Wire.beginTransmission(address);
  Wire.write(0x10);//1lx reolution 120ms
  Wire.endTransmission();
}

SCL >> PA6

SDA >> PA7

 

but  no result ,pz help me?

New BSP430 release available

$
0
0
BSP430 has been updated to the 20141115 release, which includes full support for msp430-elf and support for the new FR4xx/2xx chip families. Details are available on the web site.

Of particular interest to 43oh folks might be the updated script to build an msp430-elf toolchain, and the newlib sys integration.

If you use BSP430 and encounter any problems, please file issue reports on github.

This is the last version of BSP430 that will default to mspgcc. Henceforth it's going to be msp430-elf, though mspgcc will still be supported (at about the level that CCS is supported, i.e. not very much). I highly recommend everybody else start transitioning too. The new toolchain has its problems, but it's still the way forward.

For loop tutorial - clarification - Larson Scanner

$
0
0

Tutorial maybe should mention the term Larson Scanner, which seems to be a general term for the bouncing back and forth light effect, used in Cylons in Battlestar Galactica, and then re-used in Knight Rider (as mentioned in the item).

 

http://energia.nu/Tutorial_ForLoop.html

 

Are there earlier uses of/terms for this effect?

trouble with battery backup

$
0
0

Hi...

 

I managed to get my latest clock running with a 7447 as per my previous post without a ULN2003, but now I have another question.

 

I'd like for this clock to have a battery backup. I figured it'd be a simple task of adding a cr2032 along with a couple of steering diodes and a resistor to make sure that the battery voltage was a little lower than the supply voltage. That's not working, though.

 

I am attaching a copy of the power supply circuit I am using. The 12v supply goes to the digit LEDs. The 5v supply goes to the SN7447. The only thing that the 3.3v supply goes to is the MSP430's VCC pin1 and the reset pin16 through a 47k resistor.

 

With the 12vdc adapter plugged in, there is about 2.6-2.7vdc on the 3.3v line. With the adapter unplugged, there is about 2.0-2.1vdc on the 3.3v line from the cr2032 battery. My code is written so that the main loop continuously scans the display with the watchdog timer taking care of updating the time, which is stored in the variables hh, mm and ss.

 

I would think that as soon as the mains supply is removed, the battery should power the processor and that the MSP should be able to continue updating the time, and scanning the display, even though the display will not light since the LED and 7447 power supplies are removed. That is not what is happening, though. I can set the time, unplug the adapter and as soon as I plug it back in the display is flashing 12:00 again just like it is being powered on for the first time.

 

Any ideas as to why this is not working? I'm open to any suggestions/criticism/feedback. Thanks.

Attached Thumbnails

  • battery_backup.png

Energia on EXP430FR4133?

$
0
0

Are there any plans for Energia supporting this new launchpad?

 

I  like this HP-41C - ish LCD display, on a TI board ;-)

 

Help with using the LCD5110 library in Energia

$
0
0

I really need help to understand how to use libraries in Energia with a msp430 2453 Launchpad.

I'm using version 13 of Energia.  I'm really stuck and clueless on how to do this.  I've searched and searched for answers but can't figure this out.

 

I found links to the 5110 LCD driver at https://github.com/energia/Energia/tree/master/examples/7.Display

 

There are two here...

the LCD_5110 and the LCD_5110_SPI

Which one should I use?

 

So I click on the link and see these files LCD_5110.cpp and LCD_5100.h.

There's no link to download them.

I can view the contents.  But how do you get these into an Energia Sketch ???  Using Right Click Save Target As on these file links only creates an HTML file.  I need the .c and .h files - right??

 

I create my sketches outside of the Energia folder in a desktop folder.

 

 

Thanks to all for your help, I really appreciate it.

 

gerbs11

 

 

 

I found this Sketch and an trying to get it to work

 

#include <SPI.h>

#include "Energia.h"

#include "SPI.h"

#include "LCD_5110_SPI.h"


LCD_5110_SPI myScreen;
boolean backlight = false;
uint8_t k =0;
void setup(){
  SPI.begin();
 
  SPI.setClockDivider(SPI_CLOCK_DIV4);
 
  SPI.setBitOrder(MSBFIRST); 
  SPI.setDataMode(SPI_MODE0); 
  myScreen.begin(); 
    myScreen.setBacklight(backlight);
    myScreen.text(0,0, "LCD 5110 test"); 
    myScreen.text(0, 5,"Light off");
    myScreen.setFont(1); 
    myScreen.text(0, 2," MSP430"); 
    myScreen.setFont(0);
}

void loop() {
if (myScreen.getButton()) {  
backlight = (backlight==0);
myScreen.text(0, 5, backlight ? "Light on " : "Light off");
myScreen.setBacklight(backlight);
}
for (uint8_t i=0; i<14; i++)
myScreen.text(i, 4, (i==k) ? "*" : " ");
k ++;
k %= 14;     
delay(200);
}
 

 

 

 

 

TM4C1294 pin table spreadsheet

$
0
0

I have found the Energia pin map pdf's are difficult to match with the (several) pin numbering systems so I created an Excel spreadsheet to combine all of these. It's in a spreadsheet so you can sort on any column. This makes it much easier to find the pins and their functions. The pin functional groups are color coded. 

 

Two sample images of the tables are included, one based on the Boosterpack pins (booster_pack), and the second on the breadboard pins (breadboard). Numbering lists include physical pins X6-X9, boosterpack pins A1- D2, GPIO pins PA-PQ, and digital pin-to-port numbers 1-95

Attached Images
  • post-3993-0-80435700-1416174505.png
  • post-3993-0-86675000-1416174515.png
Attached Files

View the full article on Stellarisiti. 43oh pulls Stellarisiti Energia posts, so that members do not miss out questions. Please bear with this arrangement for now. Thanks!

CC3200 Issues while trying to connect to a past WiFi profile

$
0
0

Hi,

 

I'm using a cc3200 Launchpad. On my first run, I provided the SSID and Passphrase to connect to my router as shown below:

char ssid[] = "testrouter";
char passphrase[] = "testpassphrase";
WiFi.begin(ssid, passphrase);

I've noticed that there was a recent addition into the WiFi.begin(ssid, pass) method in the WiFi.cpp file which seems to add the SSID and Passphrase into its own profile.

 if (iRet == 0) {
        sl_WlanProfileAdd(ssid, NameLen, 0, &SecParams, 0, 6, 0);
        _connecting = true;
        return status();
    } else {
        return WL_CONNECT_FAILED;
    }

I'm having issues when I'm trying to retrieve the profile using the "int sl_WlanProfileGet()" method. I'm able to retrieve the SSID but unable to retrieve the Passphrase correctly. Following is the code I'm using to retrieve the SSID and Passphrase:

char pName[32];
int pNameLen;
unsigned char pMacAddr[8];
SlSecParams_t *pSecParams;
SlGetSecParamsExt_t *pSecExtParams;
unsigned long pPriority;
  
sl_WlanProfileGet(0, pName, &pNameLen, pMacAddr, pSecParams, pSecExtParams, &pPriority);  // index 0

pName[pNameLen] = '\0';
pSecParams->Key[pSecParams->KeyLen] = '\0';

Serial.println(pName);              // prints "testrouter"    -CORRECT
Serial.println(pSecParams->Type);   // prints 2               -CORRECT (SL_SEC_TYPE_WPA)
Serial.println(pSecParams->Key);    // prints "" -WRONG

WiFi.begin(pName, pSecParams->Key); // doesn't connect successfully


Please let me know if I'm doing something wrong or if there is another way to connect to a past profile? Thanks!

 

Edit: My actual problem is that, if I do Smartconfig and I successfully send the SSID and Passphrase to the CC3200 and it connects to WiFi router but the CC3200 powers OFF and then powers ON again, how do I make it connect to the last known SSID and passphrase without having to do Smartconfig again?

 

ENERGIA AND PROCESSING

$
0
0
I am trying to run an Arduino program on MSP-430G2452 using Energia. My code is sending data to PROCESSING(I.D.E.) on my computer via usb, to change the colour of a box(made using processing) when a switch is pressed. But it seems that the processing is not receiving anything from the board . Can anybody please tell me what wrong I am doing ? The same code is running properly with the Arduino! CODE FOR ENERGIA: int switchPin = 6; int LEDPin = 2; void setup() { pinMode (switchPin, INPUT_PULLUP); pinMode (LEDPin, OUTPUT); Serial.begin(4800); } void loop() { if (digitalRead(switchPin) == HIGH) { Serial.write(2); digitalWrite(LEDPin, LOW); } else { Serial.write(1); digitalWrite(LEDPin, HIGH); } delay(100); } CODE FOR PROCESSING: import processing.serial.*; Serial port; int val; void setup() { size(400, 400); noStroke(); frameRate(10); println(Serial.list()); // print a list of all available ports port = new Serial(this, "COM4", 4800); } void draw() { if (0 < port.available()) { val = port.read(); } background(204); if (val == 1) { fill(255, 127, 0); // fill orange } else { fill(0, 170, 0); // fill green } rect(50, 50, 300, 300); }

Schematic checkup

$
0
0

Hey guys,

 

Can I please get some feedback on a schematic for a USB/Bluetooth project before ordering the PCBs?

 

Attached File  BLE_USB_KBD_v0.8.PDF   462.85KB   18 downloads

 

The schematic is divided into 4 sections: power and Li-Po charger on the top left, a connector to external keyboard on the top right, MSP430F5502 on the bottom left and Bluetooth module connections near the bottom right. The two connectors down below are for programming the MSP and the Bluetooth module.

 

The power and Li-Po section should allow a 1-cell Li-Po battery to be charged when USB is plugged in at 500mA charge rate. The 5V booster RT9361A steps 3.0V-4.2V of the Li-Po to 5V to power the PS/2 mouse on the external keyboard connected to CONN. This +5V is then fed into the 3.3V LDO RT9030-33GU5 to supply the rest of the circuit.

 

When USB is plugged in, the F5502 should be able to detect the connection and enumerates. I followed TI's recommended USB schematic layout with a BSL button. The resonator used is a 4MHz resonator.

 

The Bluetooth module should work correctly, as it does standalone on another test PCB.

 

What I'm a bit worried about is if the RT9030-33GU5 3.3V output is going to interfere with the F5502's LDO output on pin 42 (VUSB). As for the DVCCx and AVCCx, I don't have any capacitors near them mainly because I don't have much space left on the PCB but I hope that the MSP430 would still work without them. Would it be a problem?

 

I've checked the design a few times but I always manage to find some possible screw-ups a few days after ordering PCBs.

 

Thanks for your help.

Question using: Energia, PWM, Motor-controller-SN754410 and L-pad MSP430F5529

$
0
0

Would like to try Energia using:  LP F5593, SN754410 as motor controller, 2 dc motor, PWM. (try build a line-following robot) Doing this to learn to use Energia. SN754410 pin use: 5v on 1,9,16, V-motor Pin8, Ground 4,5,12,13. Motor-1 pin 3 and 6. Motor-2 11 and 14.

1)Have just found that SN754410 must/should have 5v. Can the 4 pin for "analogWrite() - PWM " on LP (3v) be connected to SN754410 or must I have "level-shift" betwin them. Would/could a direct conection "kill" the 4-port on Lp?

2)What is the max load for 3.2v pin on LP? Are there any type of current-limit on the LP? Or is  the only limit the USB-connection. (Will use battery when all works. )

3) The pin-map show analogWrite as pink, Can all pink-collor-pin be used, or are there restriction on some of them?

rgds

Air Boosterpack on launchpad MSP430F5529 problem.

$
0
0
Hello everyone!
I meet a problem using Air Boosterpack on launchpad MSP430F5529.
 
I'm trying to make a small sensor network, a star network. 1 gateway and 2 sensors.
The gateway sends a SYNC command to broadcast address.
Each sensor listens for a random time if someone is trasmitting, if not it sends a RTS (Request To Send) command to gateway. The gateway sends back a CTS (Clear To Send).
Once the sensor receives the CTS it will send back the data to the gateway.
 
 
Before each Rx or Tx operation I've put a "while(Radio.busy())" as written in all examples.
Very often gateway or sensor freezes after sending the packet and never exit from the "while(Radio.busy())" cycle.
 
Can anyone help me with this issue?
 
Thank you
 
 
 
Attached here there are the gateway and sensor firmware. Please find the string "//IT FREEZES HERE!!!!" in order to see where the code is blocked.
 
SENSOR:
#include <SPI.h>
#include <AIR430BoostETSI.h>

// -----------------------------------------------------------------------------
/**
 *  Defines, enumerations, and structure definitions
 */

#define ADDRESS_LOCAL     0x04
#define ADDRESS_REMOTE    0x02

// identify a set of type of data received/send (command in cordata struct)
#define  SYNC 1
#define  CTS  2
#define  RTS  3
#define  SET  4
#define  DATA 5
#define  ACK  7

#define RLED P1_0
#define GLED P4_7


/**
 *  sPacket - packet format.
 */
struct sPacket
{
  uint8_t from;           // Local node address that message originated from
  uint8_t message[59];    // Local node message [MAX. 59 bytes]
};

// -----------------------------------------------------------------------------
/**
 *  Global data
 */

struct sPacket rxPacket, txPacket;
int timeout = 300;


void setup()
{
  startled();
  // Setup serial for debug printing.
  Serial.begin(115200);

  Serial.print("SENSOR, address:");
  Serial.println(ADDRESS_LOCAL);

  // The radio library uses the SPI library internally, this call initializes
  // SPI/CSn and GDO0 lines. Also setup initial address, channel, and TX power.
  Radio.begin(ADDRESS_LOCAL, CHANNEL_1, POWER_MAX);

}

void loop()
{
  blinkled(GLED, 1, 50);

  ///WAIT SYNC
  rxPacket.from=0;           // Local node address that message originated from
  memset(rxPacket.message,0,sizeof(rxPacket.message));

  while(Radio.busy()){
    Serial.println("BUSY RX SYNC^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
    delay(5);
  }

  if(Radio.receiverOn((unsigned char*)&rxPacket, sizeof(rxPacket), timeout) > 0)
  {
    if(Radio.getCrcBit()!=1)
    {
      return;
    }
  }

  if (rxPacket.message[0] != SYNC) {
    Serial.println("NO SYNC");
    return;
  }
  Serial.println("SYNC ARRIVED");


  //CARRIER SENSE
  rxPacket.from=0;           // Local node address that message originated from
  memset(rxPacket.message,0,sizeof(rxPacket.message));

  while(Radio.busy()){
    Serial.println("BUSY CARIER SENSE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
    delay(5);
  }

  if(Radio.receiverOn((unsigned char*)&rxPacket, sizeof(rxPacket), 100+random(timeout)) > 0)
  {
    Serial.println("CARRIER BUSY ********************************************");
    return;
  }
  Serial.println("CARRIER FREE");


  ///RTS
  delay(20); //attesa per dare il tempo al gateway di andare in rx
  txPacket.from = ADDRESS_LOCAL;
  memset(txPacket.message, 0, sizeof(txPacket.message));

  txPacket.message [0] = 3;
  txPacket.message [1] = 1;
  txPacket.message [2] = 1;
  txPacket.message [3] = 1;
  Radio.transmit(ADDRESS_BROADCAST, (unsigned char*)&txPacket, sizeof(txPacket));
  Serial.println("SENT RTS");

  

  ///WAIT CTS
  rxPacket.from=0;           // Local node address that message originated from
  memset(rxPacket.message,0,sizeof(rxPacket.message));
delay(80);
  while(Radio.busy()){
    Serial.println("BUSY RX CTS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); //IT FREEZES HERE!!!!
    delay(5);
  }

  if(Radio.receiverOn((unsigned char*)&rxPacket, sizeof(rxPacket), timeout) > 0)
  {
    if(Radio.getCrcBit()!=1)
    {
      Serial.println("NO CTS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
      return;
    }
  }

  if (rxPacket.message[0] == CTS) {
    Serial.println("CTS ARRIVED");
    Serial.println("");
    blinkled(RLED, 1, 50);
  }
  else Serial.println("ERROR RECEIVING CTS");

  delay(300);
}

void blinkled(uint8_t led, uint8_t time, uint8_t delayTime){
  for(int i=0; i<time; i++){
    digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(delayTime);
    digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
    delay(delayTime);     
  }
}

void startled(){
  pinMode(RLED, OUTPUT);
  pinMode(GLED, OUTPUT);
}

GATEWAY:

#include <SPI.h>
#include <AIR430BoostETSI.h>

// -----------------------------------------------------------------------------
/**
 *  Defines, enumerations, and structure definitions
 */

#define ADDRESS_LOCAL     0x02

  // identify a set of type of data received/send (command in cordata struct)
#define  SYNC 1
#define  CTS  2
#define  RTS  3
#define  SET  4
#define  DATA 5


#define RLED P1_0
#define GLED P4_7


/**
 *  sPacket - packet format.
 */
struct sPacket
{
  uint8_t from;           // Local node address that message originated from
  uint8_t message[59];    // Local node message [MAX. 59 bytes]
};

// -----------------------------------------------------------------------------
/**
 *  Global data
 */

struct sPacket rxPacket, txPacket;
int timeout = 300;

void setup()
{
  startled();
    // Setup serial for debug printing.
  Serial.begin(115200);
  
  Serial.print("GATEWAY, address:");
  Serial.println(ADDRESS_LOCAL);
  
  // The radio library uses the SPI library internally, this call initializes
  // SPI/CSn and GDO0 lines. Also setup initial address, channel, and TX power.
  Radio.begin(ADDRESS_LOCAL, CHANNEL_1, POWER_MAX);
}

void loop()
{
  blinkled(GLED, 1, 50);
  
  ///SEND SYNC
  txPacket.from = ADDRESS_LOCAL;
  memset(txPacket.message, 0, sizeof(txPacket.message));

  txPacket.message [0] = SYNC;
  txPacket.message [1] = 1;
  txPacket.message [2] = 1;
  txPacket.message [3] = 1;
  while(Radio.busy()){
    Serial.println("BUSY TX SYNC^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
    delay(5);
  }
  Radio.transmit(ADDRESS_BROADCAST, (unsigned char*)&txPacket, sizeof(txPacket));
  Serial.println("SYNC SENT");
  
  delay(40);
  
  ///WAIT RTS
  rxPacket.from=0;           // Local node address that message originated from
  memset(rxPacket.message,0,sizeof(rxPacket.message));

  while(Radio.busy()){
    Serial.println("BUSY RX RTS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"); //IT FREEZES HERE!!!!
    delay(5);
  }

  if(Radio.receiverOn((unsigned char*)&rxPacket, sizeof(rxPacket), timeout) > 0)
  {
    if(Radio.getCrcBit()!=1)
    {
      return;
    }
  }

  if (rxPacket.message[0] != RTS) {
    Serial.println("NO RTS");
    return;
  }
  Serial.print("RTS ARRIVED from: ");
  Serial.println(rxPacket.from);
  


  ///SEND CTS
  delay(20); //wait
  txPacket.from = ADDRESS_LOCAL;
  memset(txPacket.message, 0, sizeof(txPacket.message));

  txPacket.message [0] = CTS;
  txPacket.message [1] = 1;
  txPacket.message [2] = 1;
  txPacket.message [3] = 1;
  while(Radio.busy()){
    Serial.println("BUSY TX CTS^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
    delay(5);
  }
  Radio.transmit(rxPacket.from, (unsigned char*)&txPacket, sizeof(txPacket));
  Serial.println("CTS SENT");
  Serial.println("");

  delay(100);
}

void blinkled(uint8_t led, uint8_t time, uint8_t delayTime){
  for(int i=0; i<time; i++){
    digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
    delay(delayTime);
    digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
    delay(delayTime);     
  }
}

void startled(){
  pinMode(RLED, OUTPUT);
  pinMode(GLED, OUTPUT);
}

 

Simple LPM4 serial demo ... does not work

$
0
0

Hello,

 

The µc shall sleep all the time, unless the button is pressed, then there should be an output on the serial console. After that i want to let him sleep again.

But it doesn't work.. why?

Can you help me?

 

The Output is:

 

..running!

before

after

before

after

before

after

before

after

before

after

before

after

.

.

.

an pressing the button takes no effect

void setup() 
{
Serial.begin(9600);
delay(3000);
Serial.println("..running!");
Serial.println();

pinMode(P1_3, INPUT_PULLUP); 
attachInterrupt(P1_3, awake, FALLING);
  
} 



void loop() 
{
 Serial.println("before");
 LPM4;  // start in ultra low power mode, all work is done in the ISR routines
 Serial.println("after");
}

void awake(void)
{
  
  delay(100);
  Serial.println();
  Serial.println("Awake!");
  
}

i've used a fresh install of energia 0101e00013

New Grove BoosterPack from Seeed Studio

$
0
0

Hey all

Just wanted to announce the availability of the Grove Base BoosterPack from Seeed Studio! Here's a quick blog post that introduces the BoosterPack: http://energia.nu/rapid-prototyping-made-easy-with-the-grove-base-boosterpack-starter-kit-from-seeedstudio/ 

 

In short, this BoosterPack enables the LaunchPad kits to gain access to Seeed Studio's HUGE list of Grove modules. I believe they have over 130 different modules today, ranging from ultrasonic, moisture, temperature, gas, relays, displays & more.

 

While these modules can interface with any of the TI LaunchPads, they pair especially well with cloud-connected LaunchPad kits such as the CC3200 for IoT applications/intelligent sensors.

 

StarterKit_Energia.png

 

The nice thing is that most of these modules have Wiring/Arduino-based example sketches & libraries, so they work very well with Energia.

 

Here's a quick video demo of us using the Grove modules to create a cloud-connected wireless RF sensor network:

https://www.youtube.com/watch?v=P4eyB4CA-r8

 

Cheers!

Adrian


New Grove BoosterPack from Seeed Studio

$
0
0

Hey all

Just wanted to announce the availability of the Grove Base BoosterPack from Seeed Studio! Here's a quick blog post that introduces the BoosterPack

 

In short, this BoosterPack enables the LaunchPad kits to gain access to Seeed Studio's HUGE list of Grove modules. I believe they have over 130 different modules today, ranging from ultrasonic, moisture, temperature, gas, relays, displays & more.

 

While these modules can interface with any of the TI LaunchPads, they pair especially well with cloud-connected LaunchPad kits such as the CC3200 for IoT applications/intelligent sensors.

 

StarterKit_Energia.png

 

The nice thing is that most of these modules have Wiring/Arduino-based example sketches & libraries, so they work very well with Energia.

 

Here's a quick video demo of us using the Grove modules to create a cloud-connected wireless RF sensor network:

https://www.youtube.com/watch?v=P4eyB4CA-r8

 

Here's a blog post with more details: http://energia.nu/rapid-prototyping-made-easy-with-the-grove-base-boosterpack-starter-kit-from-seeedstudio/ 

 

Cheers!

Adrian

msp430g2553 goes crazy

$
0
0

Hi, everyone!

 

(I'm completely newbie, so excuse me if my questions are stupid)
I made my first "device" (pic related). It works fine for a short period of time (like an hour or something like that), but then it goes crazy: led start blinking all the time and device don't respond when I change temperature.

Could you please tell me, what's wrong?

 

 (I tried both - CR3024 battery and 3.3V power supply)

 

#include <msp430.h>
#include <RTCplus.h>

RealTimeClock rtc; //initialise the global RealTimeClock instance

int sensorPin = A3;    // select the input pin for the potentiometer
int ledPin = P1_1;     // select the pin for the LED
int sensorValue = 0;

#ifdef RTCWITHDATE
const char Months[]="JanFebMarAprMayJunJulAugSepOctNovDec";
#endif

void DisplayTime()  //routine to format & print the time to the serial port
{
#ifdef RTCWITHDATE
   const char * MonthText;
#endif
   
   if (rtc.RTC_hr<10) Serial.write('0');
   Serial.print(rtc.RTC_hr);
   Serial.write(':');
   if (rtc.RTC_min<10) Serial.write('0');
   Serial.print(rtc.RTC_min);
   Serial.write(':');
   if (rtc.RTC_sec<10) Serial.write('0');
   Serial.print(rtc.RTC_sec);
#ifdef RTCWITHDATE

   MonthText=Months+(rtc.RTC_month-1)*3;
   
   Serial.write(32);
   if (rtc.RTC_day<10) Serial.write(32);
   Serial.print(rtc.RTC_day);
   Serial.write(32);
   Serial.write(*(MonthText));
   Serial.write(*(MonthText+1));
   Serial.write(*(MonthText+2));
   Serial.write(32);
   Serial.print(rtc.RTC_year);
   
#endif
   Serial.println(" ");
}



void setup()
{
  Serial.begin(9600); //initialise Serial
  
  pinMode(ledPin, OUTPUT);  

  rtc.begin();      //initialise the RTC
  
  rtc.Set_Time(23,59,0); //Set the time to 23:56
#ifdef RTCWITHDATE
  rtc.Set_Date(2013,2,28); //Set the date to 28 Feb 2013
#endif
};

void loop()
{
   DisplayTime();  //call our routine that outputs the time
   
   digitalWrite(ledPin, LOW);
   if (rtc.RTC_min < 5) {
     // CRYSTAL TEST
     //digitalWrite(ledPin, HIGH);
     //delay(25);              
     //digitalWrite(ledPin, LOW);
     //delay(1975);
   } else {
     // THERMISTOR TEST
     sensorValue=analogRead(sensorPin);
     digitalWrite(ledPin, HIGH);   // turn the LED on (HIGH is the voltage level)
     delay(25);              
     digitalWrite(ledPin, LOW);    // turn the LED off by making the voltage LOW
     delay(sensorValue);
   };  
 };


RTC_ISR(void) {
    rtc.Inc();              // Update chunks
 };

(The overall purpose of this device is just to log temperature on SD card)

Attached Thumbnails

  • device.png
  • scheme.png

Add sample rate on msp430g2553

$
0
0
Fellow s I need some help, with my msp430g2553.I want decrease the sample rate can anyone help me


Biza, Sent from my iPad using Tapatalk

Simple debug capability through serial in CCS - noob question

$
0
0

Hi,

the debug capability of energia via serial interface was for me a very nice feature for testing serial communication.

Does the Code Composer Studio 6.0.1 also has a possibility to use the UART back channel over the USB?

I think the com port is blocked by CCS already, but maybe I'm wrong.

Maximum input frequency detectable by MSP430g2553

$
0
0

Hello,

 

Could anyone tell me the maximum input frequency which can be read through the analog pins of MSP430g2553?

 

Thanks in advance!

Viewing all 2077 articles
Browse latest View live