Jump to content
43oh

StefanWxx

Members
  • Content Count

    34
  • Joined

  • Last visited

About StefanWxx

  • Rank
    Advanced Member
  • Birthday 01/20/1975

Profile Information

  • Gender
    Male
  • Location
    Germany - Pforzheim Baden W
  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
×
×
  • Create New...