• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!

energia

Members
  • Content count

    1,056
  • Joined

  • Last visited

  • Days Won

    36

energia last won the day on March 25

energia had the most liked content!

About energia

  • Rank
    Level 4

Contact Methods

  • Website URL
    http://www.energia.nu
  1. By default SPI is on SPI(2) which is PB_6 (MISO) PB_7 (MOSI) and PB_4 (SCK). Please see the wiring pin mapping the post you mentioned. It's up a couple posts. Just to make sure, do you have power and ground connected to the NRF as well? Robert
  2. Please see the work-around for this in this thread: http://forum.43oh.com/topic/9848-energia-1610r18-windows-7-launchpad-msp430g2553-dont-load-sketch/?p=74156
  3. @curtis63 What is the supply voltage that you will be using? Depending on that you will select the ADC reference voltage. Either 2.5 or 1.5. Sketch below should help getting started. Keep in mind that this might not be very accurate. If you would like accurate battery capacity left then I would suggest using an external fuel gauge. #define BAT_MIN_VAL 800 void setup() { analogReference(INTERNAL2V5); pinMode(RED_LED, OUTPUT); digitalWrite(RED_LED, LOW); } void loop() { uint8_t val = analogRead(128 + 11); if(val < BAT_MIN_VAL) { flash(); } // do other stuff sleepSeconds(5); } void flash() { /* Flash LED three times. */ for (int i = 0; i < 3; i++) { digitalWrite(RED_LED, HIGH); delay(100); digitalWrite(RED_LED, LOW); delay(100); } }
  4. Which version of Energia do you have installed and which OS (Windows/Mac/Linux) are you on. Depending on that the instructions for how to make this work will be different. Robert
  5. INT1 from the SensorHub and nHIB from the CC3100 conflict (BoosterPack header PIN 5). Neither are being used by the libraries available. I would recommend to bend that pin outwards on the CC3100 BoosterPack so that it does not connect. Also make sure that the BoosterPacks are seated all the way down onto the pins.
  6. I am not aware of a send function existing in the Arduino AVR implementation. When I asked for the library you are using I was referring to the "LORA semtech 1272" library. Can you point us to the location of that library so that we can take a look at it? Robert
  7. Yes, comment out enableXtal() in wiring.c. This will however have impact on power consumption. Given that you know you have an external crystal you could modify the code to not do the detection phase. However, this is something that I will not be able to guide you in at this moment since I am heads down with other Energia tasks. Robert
  8. Are you using Energia? If yes, then there is indeed a delay. This is due to the startup code figuring out what clock source to use for low power modes. Details can be found in enableXtal() in wiring.c. Robert
  9. The SPI library documentation for Energia / Wiring can be found here: http://energia.nu/reference/spi/ Can you point us to the library that you are using?
  10. There is no connection from VBUS to any of the pins on the chip. What I would recommend is to tap ICDI_VBUS through a resistor divider to end up with 3.3V and then connect that to one of the pins. You might also be able to just directly connect ICDI_VBUS to the switching regulator control pin either through a resistor divider or directly if it is 5 Volt tolerant.
  11. For the analogRead() part I would take a look at wiring_analog.c which is the place where analogRead() is implemented. For the Serial printing portion, I would suggest to take a look at one of the driverlib examples: http://dev.ti.com/tirex/#/?link=Software%2FMSP430Ware%2FLibraries%2FDriver Library%2FMSP430F5xx_6xx%2FExample Projects%2FUSCI_A_UART
  12. It seems that there is a data type mismatch between whatever code is calling the SPI API's and the SPI library. Where did the ZBooster library come from?
  13. There is a significant amount of SAM and AVR specific code in the library. It does not seem like this is going to be easily portable to Energia. All the AVR / SAM specific code will need to be replaced with CC3200 specific code. Robert
  14. Did you already try using attachInterrupt() http://energia.nu/AttachInterrupt.html. volatile int state = HIGH; volatile int flag = HIGH; int count = 0; void setup() { Serial.begin(9600); pinMode(GREEN_LED, OUTPUT); digitalWrite(GREEN_LED, state); /* Enable internal pullup. * Without the pin will float and the example will not work */ pinMode(PUSH2, INPUT_PULLUP); attachInterrupt(PUSH2, blink, FALLING); // Interrupt is fired whenever button is pressed } void loop() { digitalWrite(GREEN_LED, state); //LED starts ON if(flag) { count++; Serial.println(count); flag = LOW; } } void blink() { state = !state; flag = HIGH; }
  15. I am not sure what you mean with "I want to make this rtc programable on site". Do you mean you would like to set the clock with RTC_setTime() while the system is running verses setting the clock in setup with RTC_init?