• 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!

Medsimo

Members
  • Content count

    32
  • Joined

  • Last visited

Everything posted by Medsimo

  1. nooooo !!! It's not what I'm looking for, I just need to be guided, I don't want you to do my homework. What I usually do is take examples and modify them for my need. I mean that I have covered the code provided above, but it does not work for me, so I asked. To know if something I am doing wrong. Then when communication works, I will change things my way. thank you for your answer. Greetings.
  2. any help please ? urgent !! regards.
  3. Rei Vilo what i need is generate random numbers between {1839765.71, 1839765.79} but with float variable ... how can I get it ?
  4. I try this example but the reaults is not what i'm looking for .... how can i fix it ? long randNumber; float result; void setup(){ Serial.begin(115200); randomSeed(analogRead(0)); } void loop() { randNumber = random (183976571, 183976579); Serial.println(randNumber); result = randNumber%10; Serial.println(result); delay(1000); }
  5. Hello everyone !! I have a small problem and it is the following: First I'm simulating sensors with approximate random's values, and I need to upload this data to pubnub and freeboard as monitoring platform, the problem I have is that in pubnub I find the values updated in real time, What happens, is that when I upload to freeboard are not updated, they take a fixed number. I am hesitating in the way of storing them, I think it is not appropriate. I have the well-linked accounts between pubnub and freeboard. Greetings. MR this is my code !! #include <SPI.h> #include <WiFi.h> #include "PubNub.h" #include <aJSON.h> #define NUM_CHANNELS 4 // How many analog channels do you want to read double randomDouble(double min, double max, int numCasas){ long _min = min * pow(10, numCasas) + 0.1; long _max = max * pow(10, numCasas) + 0.1; return (double) random(_min, _max) / pow(10, numCasas) ; } int sn=0; char pubkey[] = "***"; char subkey[] = "***"; char channel[] ="***"; char uuid[] = "***"; // your network name also called SSID char ssid[] = "***"; // your network password char password[] = "***"; static int keyIndex = 0; void setup() { Serial.begin(115200); randomSeed(analogRead(0)); PubNub.begin(pubkey, subkey); PubNub.set_uuid(uuid); Serial.println("PubNub set up"); } void loop() { double Freq = randomDouble(10.71, 10.79, 2)+1839755.00; double voltage_1 = randomDouble(0.82, 0.88, 2); double temperature = randomDouble(18.30, 20.00, 2); double vol = randomDouble(3.10, 3.29, 2); double data[] = {Freq, voltage_1, temperature, vol}; PubSubClient *client; // create JSON objects aJsonObject *msg, *dataReadings; msg = aJson.createObject(); aJson.addItemToObject(msg, "DataReading", dataReadings = aJson.createObject()); // get latest sensor values then add to JSON message for (int i = 0; i < NUM_CHANNELS; i++) { String Channel = String(data[i]); char charBuf[Channel.length()+1]; Channel.toCharArray(charBuf, Channel.length()+1); double Values = data[i]; aJson.addNumberToObject(dataReadings, charBuf, Values); } // convert JSON object into char array, then delete JSON object char *json_String = aJson.print(msg); aJson.deleteItem(msg); // publish JSON formatted char array to PubNub Serial.print("publishing a message: "); Serial.println(json_String); PubNub.publish(channel, json_String); free(json_String); delay(500); }
  6. Hello Guys !! how can i get random numbers between (e.g : {1839765.71, 1839765.79}) ... But only move the last digit (from 1 to 8). thanks !! regards . MR
  7. Hello all !! I have a question about my TIVA board: What is the range of frequencies that we can get for the PWM, taking into account the possibilities of "clock division" and the "number of bits"? I ask you if in case we had to measure a resonator with the PWM as a generator (at 50% duty cycle). regards
  8. hello admin .. I have been looking at the datasheet of TM4C123GH6PM and it states that the maximum clock frequency is 80Mhz. not 120. And did not put any of the divisors. they are the same ?
  9. Thank you very much for your important answers, admin med-Simo
  10. This means that depending on the divider used, the frequency varies, has used 16 bits and the variation has gone from 28.6 hz, up to 60Mhz ... but the 120 Mhz of the maximum and the minimum of the PWM does not change ?
  11. @spirilis helloo !! can you give me insteructions for read (data pins) with my Phone (NFC), how to write RF430BP with this data and read them in my phone. I'm using TM4C123GH6PM. helps please !! regardas. Insert other media
  12. hello People !! I have traying to upload this code (see below) in Tiva C LP with CC2530 AIR MODULE. I have this errors, someone gives me some help please. " I have libreries in order and all" Issues: C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'void SPIClass::begin()': C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:207:55: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive] while(ROM_SSIDataGetNonBlocking(SSIBASE, &initialData)); ^ C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'uint8_t SPIClass::transfer(uint8_t)': C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:244:35: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive] ROM_SSIDataGet(SSIBASE, &rxtxData); Tiva_measurment.ino
  13. ZBooster, I downloaded it from MWEINTRA's libraries, could tell me what part of the code is giving me error, I can not find it in my code (attached above). thanks for your reply :).
  14. hello People !! I have traying to upload this code (see below) in Tiva C LP with CC2530 AIR MODULE. I have this errors, someone gives me some help please. " I have libreries in order and all" Issues: C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'void SPIClass::begin()': C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:207:55: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive] while(ROM_SSIDataGetNonBlocking(SSIBASE, &initialData)); ^ C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp: In member function 'uint8_t SPIClass::transfer(uint8_t)': C:\Users\Myriam\Documents\Energia\libraries\SPI\SPI.cpp:244:35: error: invalid conversion from 'long unsigned int*' to 'uint32_t* {aka unsigned int*}' [-fpermissive] ROM_SSIDataGet(SSIBASE, &rxtxData); ^ code: Tiva_measurment.ino
  15. Okay, I have something, but I would like to know if these data are correct, because 18 degrees seem exaggerated to me in a room where the maximum is 13 degrees. The voltage does not know if it is good or not. another question. How could you measure the temperature with the TMP006 of the CC2530 module and send it to the coordinator? for more information: please see https://github.com/mweintra/ZigBee/issues/1. I have put my doubts there, but mweintra told me to put them in this forum. https://cloud.githubusercontent.com/assets/23233776/22747556/a8087518-ee27-11e6-9fe7-a0444c27c408.png any help please ? med.
  16. hello all !! I need to test the TMP006 Anaren's temperature sensor. it's an a boosterpack with TIVA C. so how can i do this. i used the "adafruit TMP006" and "Educational BoosterPack MK II "code in energia V17. but nothig showed in serial port. any help please !! med .
  17. hello all !! I'd been worked with MSP430G25530 target for Frequency measurment ... I have a code but, when I use the Serial.print (). nothing show up. any helps please ? my code : Freq-Measurment.ino
  18. Okay, I have something, but I would like to know if these data are correct, because 18 degrees seem exaggerated to me in a room where the maximum is 13 degrees. The voltage does not know if it is good or not. another question. How could you measure the temperature with the TMP006 of the CC2530 module and send it to the coordinator? for more information: please see https://github.com/mweintra/ZigBee/issues/1. I have put my doubts there, but mweintra told me to put them in this forum. https://cloud.githubusercontent.com/assets/23233776/22747556/a8087518-ee27-11e6-9fe7-a0444c27c408.png any help please med. Sensor_End_Device.rar Gateway_Coordinator.rar
  19. What LaunchPad are you using? ...................................................................................................... MSP430G2553LP v1.4 What operating system? ................................................................................................................... Windows 8.1 Did you install the required drivers according to instructions on http://energia.nu/guide/ ? .............. Yes. Can you see a new serial port appear when plugging in the LaunchPad? ...................................... Yes.
  20. thank you Peter I've been checking your code in my device and ... I can not get anything in the serial monitor.
  21. I started with this simple example (look below), and it does not show anything in the serial port either.
  22. @chicken the serial output example does not work either... And thanks, I'll learn to ask specific questions !!!
  23. // Core library #if defined(__MSP430G2553__) #else #error Platform not supported #endif #include "Thermometer_430.h" Thermometer_430 myThermometer; void setup() { pinMode(PUSH2, INPUT_PULLUP); myThermometer.begin(); Serial.begin(9600); Serial.println("Thermometer"); Serial.println("press PUSH2 to exit serial"); } void loop() { myThermometer.get(); Serial.print(myThermometer.temperatureX10()/10, DEC); Serial.print("."); Serial.println(myThermometer.temperatureX10()%10, DEC); if (digitalRead(PUSH2)==LOW) { Serial.println("exit"); Serial.end(); while(true); // endless loop } } Nothing show up ... help please.
  24. hello ninisnanas How have you done to upload the anaren demo to the CC2530 for MSP430?