• 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

About Medsimo

  • Rank
    Advanced Member
  • Birthday 03/31/1991

Profile Information

  • Gender
    Not Telling
  • Location
    Spain

Recent Profile Visitors

156 profile views
  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 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 ?
  8. Thank you very much for your important answers, admin med-Simo
  9. 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 ?
  10. 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
  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