Jump to content

lilyhack

Members
  • Content Count

    30
  • Joined

  • Last visited

About lilyhack

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    United States

Recent Profile Visitors

540 profile views
  1. I didn't get it working with Anaren ZigBee So I used Digi XBee modules (XBee S2C) with TI TM4C129 on Energia This code should help you getting started. Connect the Xbee TX, RX to TI RX, TX respectively ( I used UART3 of TI) and GND, 3.3V for power.
  2. I am trying to find the timing of how long it takes for an analogread operation like below. How do I do that in energia? Is there a way I can timestamp before and after the code and take the difference? voltSensor= analogRead(A7);
  3. lilyhack

    How to store data in TM4C

    Do you have an example of how to read/write to the internal EEPROM?
  4. I am building a control system (TM4C129/123) that generates many data. These data are sent back to a higher level controller (Raspberry Pi) through ZigBee. Now, instead of TI always sending the data, I want to change the system so that when Raspberry Pi request data, only then TI sends data. So that means storing those data until the data request come. The data can be lost after the power off. How do I do that? I understand there is a limit to how long we can store the data depending on the size of the data.
  5. lilyhack

    TivaWare library with Energia on Mac

    @@Robert I am planning to use ADC functionalities. Is that part of driverlib?
  6. Can we use Tivaware with Energia? On a Mac? All the downloadable TivaWare libraries I see here are .exe files. Did anyone try it?
  7. I am using the current sensor HO 10-P with my TM4C123 launchpad board. Essentially I have to connect the Vout pin to a GPIO, configure the GPIO as an ADC pin and then configure the ADC controller to read the Vout from the sensor. I will connect the Vout to PE2 (which is AIN2 and also a GPIO). Wondering how to configure this GPIO as an ADC and then read it? Can you show a sample code snippet?
  8. I am using this current sensor in my project. The Vout pin needs to be connected to the ADC. The best way to do this is to connect it to some analog pin and tie that analog pin to ADC through the code. Anything else? Can you refer to a sample code for this?
  9. I have an XBee (S2C) connected to my Mac and another XBee connected to a TI microcontroller (TIVA-C129) communicating with each other - Mac as a coordinator and TI as a router. I can communicate between them, but on the TI side, I can't read the exact data that is coming in the serial port. On the Mac, I am running below python code that reads the incoming serial data through XBee and writes an acknowledgment. #!/usr/bin/python import serial ser = serial.Serial('/dev/tty.usbserial-A104IC2U', 9600) ack='A' while True: incoming = ser.readline().strip() if incoming != 'A': print '%s' % incoming ser.write('%s\n' % ack) On the TI side, I have below code int incomingByte = 0; void setup() { Serial3.begin(9600); //UART3 has XBee connection pinMode(LED, OUTPUT); } void loop() { Serial3.println("Sending command to the XBee"); delay(1000); Serial3.println("I am R1"); delay(1000); if (Serial3.available() > 0) { // read the incoming byte from UART3 incomingByte = Serial3.read(); // say what you got, print at the usb serial console Serial.print("I received: "); Serial.println(incomingByte, DEC); } } When I run this, XBee communication stops after printing "I am R1" in the python console. I am sure Serial3.available() > 0 is working as when I replace it with a blink code like below, it works and XBee communication keeps working on. if (Serial3.available() > 0) { digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second } So looks like the problem is in incomingByte = Serial3.read(); From python, I am sending a string (%s) with ser.write('%s\n' % ack). Is Serial3.read() the right read mechanism for the ack string? Anything else? FYI: I tested the serial.read() only with TI (no python involved) by writing something in the console and serial.read() can read and print it.
  10. I am planning to port this code for TIVA-C129 using Energia (on a Mac). 1st trying if it even compiles. I have below include #include "XBee.h" #include <SoftwareSerial.h> Getting error "#include <SoftwareSerial.h> ^ compilation terminated." I even tried doing #include "SoftwareSerial.h" but same error. What am I missing?
  11. lilyhack

    TM4C129 Launchpad and XBee

    Not sure how to use UART1 but I used UART3 and used Serial3 in the code and it worked. Thanks.
  12. lilyhack

    TM4C129 Launchpad and XBee

    UART0
  13. I am using TM4C129 Launchpad launchpad and trying to connect XBee Series 2 (S2C) through UART. Looking into the pinout of TM4C129, I am connecting like below XBee TX <---> RX (UART0) XBee RX <---> TX (UART0) XBee 3.3V <---> pin#41 XBee GND <---> pin#62 I use below code on the LaunchPad at Energia void setup() { Serial.begin(9600); //pinMode(13, OUTPUT); } void loop() { Serial.println('H'); delay(1000); Serial.println('L'); delay(1000); } And the below python code runs on my Mac as a coordinator #!/usr/bin/python import serial ser = serial.Serial('/dev/tty.usbserial-A104IC2U', 9600) while True: incoming = ser.readline().strip() print '%s' % incoming But it doesn't work. FYI, this code worked on Arduino. Has anyone tried this before? Any suggestion? Am I missing some connection? jumper settings? Anything on the code?
  14. Does Energia support Anaren A2530E24A-LPZ ZigBee module? Specifically for TM4C123GXL Launchpad (or TM4C129 Launchpad)? If so, how can I get some code samples? Anaren site only has example for CCS. If not, does Energia support any other ZigBee module to work with TivaC?
  15. lilyhack

    Where is Energia Library in Mac

    Thought lm4f is for stellaris, not for TIVA. But looks like it has all the libraries. Thanks for the help.
×