Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by StefanWxx

  1. Hi, I would do it other than with analogread(),...simply work with the IRSend and IRrecv Examples. Take a tsop31238 to receive.
  2. Unfortunately I have no osciloscope , is this PWM OK to use it for an IR-Signal? #include <msp430g2553.h> void main(void) { int counter = 26; // Is this correct? WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= BIT6; // Set P1.6 to output direction P1OUT &= ~BIT6; // Set the green LED off P1SEL |= BIT6; // Green LED controlled by PWM TA0CCR0 = counter; // Count limit (16 bit) TA0CCR1 = counter/2; // 50% duty cycle TA0CCTL0 = 0x10; // Enable Timer A0
  3. Thanks for the instructions, i have changed the code , now I 'm going to measure the current int test; void setup() { test=0; Serial.begin(9600); delay(3000); Serial.println("..running!"); Serial.println(); pinMode(P1_3, INPUT_PULLUP); attachInterrupt(P1_3, awake, FALLING); } void loop() { if (test == 1) { Serial.println("Button pressed"); delay(1000); Serial.println("doing some special stuff"); delay(1000); Serial.println("doing NOOP"); delay(1000); test = 0; } Serial.println("...suspending"); Serial.flush(); suspend(); // start in ultr
  4. Hi, the debug capability of energia via serial interface was for me a very nice feature for testing serial communication. Does the Code Composer Studio 6.0.1 also has a possibility to use the UART back channel over the USB? I think the com port is blocked by CCS already, but maybe I'm wrong.
  5. Thanks for your reply, My app has just sent to many commands when a slider is moved, so i get corrupt data. Disabling btSerial has helped. In the meantime I have changed my sketch, the bluetooth receiver is now connected to the hardwareserial ports, Pin3&4 . Although I can not debug, but .... it works now as it should and in this case i had to comment out the disable Serial command in processCommand() but don't know why.
  6. Hello again, my actual project is a windowsphone app. With this app i want to control some led lights over bluetooth -> means that a command string comes over softwareserial I have already solved a lot myself, but now I need support. First Problem is that these 2 Lines only prints an empty row on the serial console, but not the word TEST. In a simple sketch this is working good! But not in my program, an i don't know why. look at the simple example at the bottom String pointer5 = "TEST"; Serial.println(pointer5); Second, this has not worked: if (pointer[5] =
  7. Hi, a simple program and also a simple problem, but I can not find a solution. someone has a tip for me? char text[] = "Value1, 1000, Value2,100,Value3,1.414,end"; void setup() { Serial.begin(9600); } void loop(){ char *p = text; char *str; while ((str = strtok_r(p, ",", &p)) != NULL) // delimiter is comma { Serial.println(str); delay(500); } } The output ist not as expected: Value1 1000 Value2 100 Value3 1.414 end Value1 Value1 Value1 Value1 Value1 Value1 Value1 . . . . . I want this: Value1 1000 Value2 100 Value3 1.414 end Value1 1000
  8. Okay, just another Question about this.. How can ich make this with a loop: void loop() { const char* color = "34acef"; //GGRRBB unsigned long a = strtoul (color, NULL, 16); // want to do this in a loop: leds0[0] = (a >> 16) & 0xFF; leds0[1] = (a >> 8) & 0xFF; leds0[2] = a & 0xFF; leds0[3] = (a >> 16) & 0xFF; leds0[4] = (a >> 8) & 0xFF; leds0[5] = a & 0xFF; leds0[6] = (a >> 16) & 0xFF; leds0[7] = (a >> 8) & 0xFF; leds0[8] = a & 0xFF;
  9. Hi, in my code i want so set the color for a rgb led stripe. I use the WS2811Driver library. I tried this but it doesn't work: // blink_strip - ws2811 led strip blink example // 11-15-2012 Initial Version 0.1 #include <WS2811Driver.h> byte leds0[30]; byte leds1[30]; // 24 bits of color data stored GGRRBB //const uint8_t leds0[] = { 0x00,0xff,0x00, 0xff,0x00,0x00, 0x00,0x00,0xff, 0xff,0xff,0xff }; // R,G,B,W //const uint8_t leds1[] = { 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00 }; // 0,0,0,0, WS2811Driver ledStrip; // uses P1_7 as datapin connect to DIN o
  10. @@Thorvard,@@SixSixSevenSeven in fact, I can now read the correct keys with the code, after I have added 'HIGH' to the Row Ports, before the keypad library takes over. #include <Keypad.h> #include <IRremote.h> const byte ROWS = 6; //four rows const byte COLS = 5; //four columns //define the cymbols on the buttons of the keypads char hexaKeys[ROWS][COLS] = { //b1-b6 = blank ones, not connected {'0','1','2','3','w'}, {'b1','4','5','6','.'}, {'7','8','9','-','C'}, {'%','m','b2','+','R'}, {'=','M','/','*','b3'}, {'b4','O','o','b5','b6'} }; byte rowPins[ROWS] = {P1
  11. thank you for the advice my paradigm leads to that I can not read the correct keys: #include <Keypad.h> #include <IRremote.h> const byte ROWS = 6; //four rows const byte COLS = 5; //four columns //define the cymbols on the buttons of the keypads char hexaKeys[ROWS][COLS] = { //b1-b6 = blank ones, not connected {'0','1','2','3','w'}, {'b1','4','5','6','.'}, {'7','8','9','-','C'}, {'%','m','b2','+','R'}, {'=','M','/','*','b3'}, {'b4','O','o','b5','b6'} }; byte rowPins[ROWS] = {P1_3, P1_4, P2_1, P1_5, P2_0, P2_2}; //connect to the row pinouts of the keypad byte
  12. no, i call: IRsend irsend; to initialize the IR object Without LPM4 addition, this code works.
  13. Hello, I'm still working on my Project -> C2RC -> Calculator2Remote Conversion The circuit and the IR codes now work after I adjusted the pulse timings. But now I wonder how I can put the MSP430G2553 in sleep mode.. I've followed the suggestion of energia http://forum.43oh.com/topic/2904-is-there-a-way-in-energia-to-access-the-lpms/ But I must be doing something fundamentally wrong, because I think that would be too easy: /* @file CustomKeypad.pde || @version 1.0 || @author Alexander Brevig || @contact alexanderbrevig@gmail.com || || @description || | Demonstrates changing the
  14. after 3 days of breeding, the egg is layed! use this pulse parameters #define SAMSUNG_BITS 32 #define SAMSUNG_HDR_MARK 4500 #define SAMSUNG_HDR_SPACE 4250 #define SAMSUNG_BIT_MARK 600 #define SAMSUNG_ONE_SPACE 1400 #define SAMSUNG_ZERO_SPACE 450 now it works, easter may come
  15. i send the IR Code, but after sending, the IR LED stays on.. until the next irsend command, but i don't know why sometimes after sending it is on, sometimes off Whether the code is right or wrong, the red LED from the TV is not even blinking, thus, it not receives the signal
  16. Thank you bluehash, hmm, samsung tvs are apparently problematic... I have no other solution for the Samsung IR Codes adaptation of the library, I've commented out the two lines in the IRremote.cpp, Does it make sense to continue to experiment in the IRremoteInt.h? // defines for Timer_A (16 bits) // NOTE: Using A1 instead of A0 because A0 is used by Serial #if defined(IR_USE_TIMERA) #define TIMER_RESET #define TIMER_ENABLE_PWM (TA1CTL = TASSEL_2 + MC_1) // SMCLK, Up mode #define TIMER_DISABLE_PWM (TA1CTL = TASSEL_2 + MC_0) // SMCLK, Stop mode #define TIMER_ENABLE_INTR ({
  17. I'm really frustrated, doing the same with a Yamaha AV-Receiver, no Problems. recorded IR Signals sent as RAW works!!! So, no errors in the wiring! I add the Samsung Codes in the library and attached it here, with that I can decode signals -> E0E040BF = Power On/OFF in 32-bit When i send: irsend.sendSamsung(0xE0E040BF, 32); no reaction of the TV!! as same as with the RAW codes... I have 2 Samsung TVs,with remote control: AA59-00582A Where the dog is buried?
  18. Hello, I have studied these two manuals for the arduino and I have tried to implement this with the msp430g2533. http://as3breeze.com/arduino-sending-samsung-ir-codes/ http://arduinostuff.blogspot.de/2011/06/samsung-remote-ir-codes.html I have similar codes dumped with irrecvdump demo. In IRremote.cpp i commented this out: //pinMode(TIMER_PWM_PIN, OUTPUT); //digitalWrite(TIMER_PWM_PIN, LOW); // When not sending PWM, we want it low IR-LED PIN ist connected to P2_3 and GND. /* * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend * An IR LED must b
  19. Hi, theoretically it would have to go directly or with an old mobile phone data cable. (I don't know the exact output level your rfid reader) Otherwise, I can recommend to look at the software serial examples . generally for the pc <-> mc connection I always take an old mobile phone cable (with max232 chip)
  20. @@Fred Next time I will describe it in more detail, The heli is quite difficult to control manually, a msp could do it certainly better, especially with openkinect
  21. @@pabigot Thanky you very much for your hints, but I am overwhelmed with the very detailed timer.h file. Can you please direct me to a concrete example?
  22. Hi, No, I wanted not send data over the serial port, but this is certainly possible but i cannot exclude timing problems of which I know nothing at the moment. I want to control directly a L298N Dual H Bridge DC Stepper Motor Drive Board. With the remote i want to drive a toy car, little project for my son and learning purposes.
  23. @@Philipp cool 1D pinball, thx
  • Create New...