xeebot 5 Posted January 5, 2018 Share Posted January 5, 2018 Good evening! I'm using a CC3200MOD Launchpad - I have tested this on two of those boards, as well as on a CC3200 Launchpad. The results are the same each time. I have a Reed switch on a bread board. If I connect to Pin 3 (header row one, 3rd pin down from the top), the reed switch value never changes. (results not expected) If I change the jumper wire to Pin 8 and change the sketch from 3 to 8, the Reed value changes state with the presence or removal of a magnet. (expected result) Can anybody point out my error? From the pin map below, the two pins should function the same.Pin Map Quote Link to post Share on other sites
xeebot 5 Posted January 5, 2018 Author Share Posted January 5, 2018 Please note, Pin 3 is RX on the Launchpad, so I am wondering if the pin is reserved for that reason or if there is something else going on - hopefully, it isn't reserved, as RX is not needed when the BIN is already uploaded and running Quote Link to post Share on other sites
energia 484 Posted January 5, 2018 Share Posted January 5, 2018 This pin is also connected to SW3 aka PUSH1. There is a 10k pulldown on this pin. How do you have the read switch connected and how do you set pin 3 as input in your Sketch? One thing to try is to use your existing code with pin 3 as input and then push SW3 and see if the value changes in the Serial monitor. Robert Quote Link to post Share on other sites
xeebot 5 Posted January 5, 2018 Author Share Posted January 5, 2018 (edited) Sure enough, pressing PUSH1 and it reads properly. The reed switch is connected to pin 3 via a jumper wire to the breadboard: const int Hall = 3; pinMode(Hall, INPUT_PULLUP); int HallValue = digitalRead(Hall); Serial.print("Hall Sensor Value: "); Serial.println(HallValue); I've got the Piezo working (PWM), so I'm swapping out the reed switch for a Hall sensor. Once I've got that working as expected, I'll compile and should have firmware that can test all the components on my board. Will post something in this forum documenting all the separate little pieces once I have that working. Thank you VERY much for taking the time to answer all of the questions we noobs keep throwing out here. It makes a big difference! Edited January 5, 2018 by xeebot left out one line Quote Link to post Share on other sites
energia 484 Posted January 7, 2018 Share Posted January 7, 2018 The internal PULLUP resistor is to weak to effect the 10K PULLDOWN on SW3. You'll need a 1K pullup connected to the reed switch. See schematic snip for the CC3200 LaunchPad below: Quote Link to post Share on other sites
xeebot 5 Posted January 7, 2018 Author Share Posted January 7, 2018 100% on target, sir! I had actually switched over to a hall sensor on pin 8 with a 10k resistor and just switched to 3. Works like a champ. 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.