vaultingnaq 0 Posted March 8, 2013 Share Posted March 8, 2013 Greetings everyone, I am in dire need of your help. I am quite the beginner here and I am currently working on a project. I have a remote with 6 push buttons. I have opened up that remote and soldered it's PC board to my MSP430 LaunchPad (M430G2553 chip) Rev.1.5. I have also connected the EZ430-RF2500 to the launchpad. My goal is to make a GUI which has 6 buttons, pressing any of those buttons on my screen should be able to control the 6 buttons on the remote. Like having your sound system remote connected to your launchpad and rf2500, and then you are controlling it from your PC. Btw, even after soldering the remote and the launchpad together, I can still manually control my sound system through the remote. Now, I just want to control it via my PC. I am really good with C, C++ and Java languages but unfortunately, I have no idea on how to start/proceed when you bring the Launchpad into the picture. I am not even sure if I can achieve this task? Can someone help me out with this issue? I am reading up on the Start Up guides and all but nothing seems to making sense to me. Your feedback will be really appreciated. P.s. I need to finish this project in a week, if I want to pass my course =/ Quote Link to post Share on other sites
semicolo 39 Posted March 8, 2013 Share Posted March 8, 2013 I think you need to open the serial port corresponding to the EZ430 and send commands to the MSP430. The MSP430 should wait for incoming bytes on the serial line and toggle the remote buttons accordingly. Quote Link to post Share on other sites
vaultingnaq 0 Posted March 8, 2013 Author Share Posted March 8, 2013 Hey, Thanks for the quick response! http://www.instructables.com/id/Control-three-power-sockets-from-a-PC-wirelessly/step4/Code/ This is the tutorial that I am using. From the website above, I have downloaded the main.c into my launchpad. I understand what you are saying. But, in terms of Energia, how do I go about programming it like the way you have mentioned? I just need some advice and the programming part on how to set it up, I can then play around on using it. (since I am a newbie) Thanks! Quote Link to post Share on other sites
bluehash 1,581 Posted March 8, 2013 Share Posted March 8, 2013 Any reason you are using Energia? I don't see it used in the main.c file. Also, did you program the LP. If yes, tell us what you did step-by-step. 1. 2. . . Quote Link to post Share on other sites
vaultingnaq 0 Posted March 8, 2013 Author Share Posted March 8, 2013 I am thinking to use Energia because it seems much easier than using the Machine code in the Code Composer. I might be completely wrong here. I am guessing the Code composer will give me more options for the GUI system. As for the LP, I have just downloaded the main.c into the LP. Now, I am trying to figure out a way to use RF-2500 to run applications on the LP wirelessly. Quote Link to post Share on other sites
bluehash 1,581 Posted March 8, 2013 Share Posted March 8, 2013 As for the LP, I have just downloaded the main.c into the LP. Now, I am trying to figure out a way to use RF-2500 to run applications on the LP wirelessly. What did you do after that? Disconnect the LP, Start the program? You need to send 0 or 1 or etc depending on what you want activated. Quote Link to post Share on other sites
vaultingnaq 0 Posted March 8, 2013 Author Share Posted March 8, 2013 I tried using the Real Term: Serial Capture Program (shown on the link that I posted above) and tried sending ASCII characters of '0' or '1'. Didn't do anything If I connect the RF2500, can I program a GUI that can send '0', '1', '2' etc into the LaunchPad? But then again, I still don't know if sending 0', '1', '2' works or not. Is there another way I can see if '0', '1', '2' .. works on the remote? I was wondering if Energia can do that for me? Quote Link to post Share on other sites
bluehash 1,581 Posted March 8, 2013 Share Posted March 8, 2013 Are you on the right serial port. Is your baud rate 9600, 8, 1 You can check if you are sending the right data, by shorting the RX, TX pin on the LP. Quote Link to post Share on other sites
vaultingnaq 0 Posted March 8, 2013 Author Share Posted March 8, 2013 Yea I checked the jumpers configuration. Its exactly as shown on the website. And my baud rate is 9600, 8, 1. Quote Link to post Share on other sites
vaultingnaq 0 Posted March 8, 2013 Author Share Posted March 8, 2013 Is there any example on Energia that shows how to control the LP pins in the following way: P1.0 - Receiver 1 - Off P1.1 - Receiver 1 - OnP1.4 - Receiver 2 - OffP1.5 - Receiver 2 - OnP1.6 - Receiver 3 - OffP1.7 - Receiver 3 - On Quote Link to post Share on other sites
semicolo 39 Posted March 9, 2013 Share Posted March 9, 2013 I don't quite understand your last question. You set the pins in energia with pinMode (P1_0, INPUT) // or OUTPUT then use digitalRead(P1_0) if it's an input or digitalWrite(P1_0, HIGH) // or LOW if it's an output Quote Link to post Share on other sites
gwdeveloper 275 Posted March 9, 2013 Share Posted March 9, 2013 What program did you install on the RF2500? That code seems as though it needs the rf2500 setup as a wireless uart. Search around the web. There are projects that have the correct configuration for what you're attempting, but that main.c you're using won't cut it. Quote Link to post Share on other sites
vaultingnaq 0 Posted March 9, 2013 Author Share Posted March 9, 2013 semicolo: I made a new program in Energia to do my bidding: #include "msp430.h" #include "msp430g2553.h" #include "stdbool.h" int Receiver1_Off = P1_0; // select the analog pin for Receiver1 Off int Receiver1_On = P1_1; // select the analog pin for Receiver1 On int Receiver2_Off = P1_4; // select the analog pin for Receiver2 Off int Receiver2_On = P1_5; // select the analog pin for Receiver2 On int Receiver3_Off = P1_6; // select the analog pin for Receiver3 Off int Receiver3_On = P1_7; // select the analog pin for Receiver3 On int counter = 0; // variable to store the value coming from the sensor int Receiver1_value = 0; // variable to store the Receiver1 status int Receiver2_value = 0; // variable to store the Receiver2 status int Receiver3_value = 0; // variable to store the Receiver3 status void setup() { Serial.begin(9600); // start serial port at 9600 bps pinMode(P1_4, INPUT); // R2 OFF button is our input pinMode(P1_0, OUTPUT); pinMode(P1_1, OUTPUT); pinMode(P1_5, OUTPUT); pinMode(P1_6, OUTPUT); pinMode(P1_7, OUTPUT); } void loop() { // get incoming byte: counter = Serial.read(); Serial.print("Counter: "); Serial.print(counter); Serial.print("\n"); // Check to see if the Receiver2 (R2) is Off and display it on the screen Receiver2_value = digitalRead(Receiver2_Off); Serial.print("Receiver_Value: "); Serial.print(Receiver1_value); Serial.print("\n"); // If Receiver 2 has been shut OFF then // Then turn R1 OFF - send a HIGH signal to P1_0 // Wait for few seconds // Then turn R1 ON - Send HIGH Signal to P1_1 // Then turn R3 ON - Send HIGH Signal to P1_7 if (Receiver1_value > 0) { digitalWrite(P1_0, HIGH); delay (1500); digitalWrite(P1_1, HIGH); digitalWrite(P1_7, HIGH); } } The code checks out in Energia and has no problem in being uploaded. The problem is that I don`t see anything on the cmd or Serial Monitor. No response at all. Where I am making a mistake here? I have even tried pushing the buttons on the remote, and I get nothing... Quote Link to post Share on other sites
vaultingnaq 0 Posted March 9, 2013 Author Share Posted March 9, 2013 gwdeveloper: You are absolutely right, as of yet, I have no idea as to how I can implement the RF2500. I also haven't been able to find any examples to showcase that. Do you have any suggestions? Quote Link to post Share on other sites
gwdeveloper 275 Posted March 9, 2013 Share Posted March 9, 2013 Personally, in this case, I would eliminate the Launchpad completely. The rf2500 has the F2274 which is much more powerful that anything on the LP. It has enough free GPIO for what you are doing plus it has the CC2500 on board. Search the forums for the CC2500 tutorial and that should get you started on the wireless communication. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.