Jump to content

rycco

Members
  • Content Count

    10
  • Joined

  • Last visited

  1. Hello i have seen article about reading the supply voltage from MSP430 http://www.elevendroids.com/2013/06/code-recipe-reading-msp430-power-supply-voltage-level/ It can be usefull when running on batteries however i am not able to find anything suitable to use for TM4C123. The system DEFINES carries another names and the code can not be used. I have only used Energia for programming my LM4F120. If anyone have some experience in reading the internall VCC a and Voltage Reference to compute supply voltage level on TM4C123 I would be thankfull.
  2. Hello, i am having problems with math library using energia. I always keep getting thi s error. I dont know whats wrong. Error : http://pastie.org/8127090 Here you can read the source : http://pastie.org/8127093#871-872 I highlighted the lines which are makeing troubles. Its lines 871 and 872, by commenting them you can avoid getting this error. float accel_angle_y = atan(-1*accel_x/sqrt(pow(accel_y,2) + pow(accel_z,2)))*RADIANS_TO_DEGREES; float accel_angle_x = atan(accel_y/sqrt(pow(accel_x,2) + pow(accel_z,2)))*RADIANS_TO_DEGREES;
  3. Wiring seems to be good, but after running scanner i still receive device on each adress. I also tried to use the sketch from http://playground.arduino.cc//Main/MPU-6050?action=sourceblock&num=1 with just a little changes like Wire.begin(2); //to work on pins 5 and 6 Tried both adresses, which are written on in the sketch. But i always receive a zero from the device so the output looks like MPU-6050 Read accel, temp and gyro, error = 0 accel x,y,z: 0, 0, 0 temperature: 36.506 degrees Celsius gyro x,y,z : 0, 0, 0, I have no idea how to make it run :/
  4. Thank you, i will try it. BTW your drawing is pretty clear and nice
  5. Please, do you have some clear sketch how to wire a correct pullup resistors ?
  6. Ok, i will try pullup resistors, but do you think it will solve the qestion why i see an I2C device on each address ?
  7. Hello, I am having big troubles with running I2C on my stellarpad. I am total noob to this topic so i want to ask if anyone can explain it. I have found that Stellarpad has 4 chanells. I have got some questions. 1. How to wire an I2C device properly. Do i need pullup resistors or should i use pinMode on INPUT_PULLUP ? 2. How i can ensure that i connected the device properly ? I tried I2C scanner from arduino webside, but I always recieve message device found on each adress, with nothing connected to board. Here is the I2C scanner code : // -------------------------------------- // i2c_scanner // // Version 1 // This program (or code that looks like it) // can be found in many places. // For example on the Arduino.cc forum. // The original author is not know. // Version 2, Juni 2012, Using Arduino 1.0.1 // Adapted to be as simple as possible by Arduino.cc user Krodal // Version 3, Feb 26 2013 // V3 by louarnold // Version 4, March 3, 2013, Using Arduino 1.0.3 // by Arduino.cc user Krodal. // Changes by louarnold removed. // Scanning addresses changed from 0...127 to 1...119, // according to the i2c scanner by Nick Gammon // http://www.gammon.com.au/forum/?id=10896 // Version 5, March 28, 2013 // As version 4, but address scans now to 127. // A sensor seems to use address 120. // // // This sketch tests the standard 7-bit addresses // Devices with higher bit address might not be seen properly. // #include <Wire.h> void setup() { Wire.begin(2); Serial.begin(9600); Serial.println("\nI2C Scanner"); } void loop() { byte error, address; int nDevices; Serial.println("Scanning..."); nDevices = 0; for(address = 1; address < 127; address++ ) { // The i2c_scanner uses the return value of // the Write.endTransmisstion to see if // a device did acknowledge to the address. Wire.beginTransmission(address); error = Wire.endTransmission(); if (error == 0) { Serial.print("I2C device found at address 0x"); if (address<16) Serial.print("0"); Serial.print(address,HEX); Serial.println(" !"); nDevices++; } else if (error==4) { Serial.print("Unknow error at address 0x"); if (address<16) Serial.print("0"); Serial.println(address,HEX); } } if (nDevices == 0) Serial.println("No I2C devices found\n"); else Serial.println("done\n"); delay(5000); // wait 5 seconds for next scan } Thanks for help.
  8. Hello, i need help with running GY521 gyro on my Stellaris Launchpad with Energia. I found something about wiring GND -> GND 3,3V -> VCC Analog4 -> SDA Analog5 -> SCL and also read this topic at arduino http://playground.arduino.cc/Main/MPU-6050 there is a sketch but i dont know how to port it at Energia for stellaris launchpad. So i want to ask if there is anybody, who was playing with gyro and can help me understand the way it works. Thanks
  9. Rei Vilo, this is what i got ... (copypasted ur code) 42 41957 43 42956 44 43955 45 44954 46 45953 47 46952 48 47951 49 48950 50 49949 51 50948 52 51947 53 52946 54 258 55 1257 56 2256 57 3255 58 4254 59 5253 60 6252 61 7251 i have no idead why is this happening ... EDIT - misspelling
  10. Hello, i have some strange problem while using Energia on my Stellaris Launchpad. On reference sites is written that millis overflows after approximately 50 days, but mine wont last longer then 53 seconds. Here is the code used just for displaying int blueL = 40; int blueState = 0; unsigned long time; unsigned long test_time; void setup() { Serial.begin(9600); pinMode(blueL,OUTPUT); time = millis(); } void loop() { if (millis() - time > 1000) { digitalWrite(blueL,blueState); blueState = !blueState; time = millis(); } test_time = millis(); Serial.print("current time in millis : "); Serial.print(test_time); Serial.print("\tlast blinked time in millis : "); Serial.println(time); } And here is what i get in time of overflow current time in millis : 53176 last blinked time in millis : 52790 current time in millis : 53247 last blinked time in millis : 52790 current time in millis : 53319 last blinked time in millis : 52790 current time in millis : 53391 last blinked time in millis : 52790 current time in millis : 53463 last blinked time in millis : 52790 current time in millis : 53535 last blinked time in millis : 52790 current time in millis : 53607 last blinked time in millis : 52790 current time in millis : 53679 last blinked time in millis : 52790 current time in millis : 63 last blinked time in millis : 37 current time in millis : 129 last blinked time in millis : 37 current time in millis : 196 last blinked time in millis : 37 current time in millis : 262 last blinked time in millis : 37 current time in millis : 329 last blinked time in millis : 37 current time in millis : 396 last blinked time in millis : 37 current time in millis : 462 last blinked time in millis : 37 Its just about 53 seconds before overflow. Does anyone have some advice ? Thanks
×
×
  • Create New...