Jump to content
xeebot

[SOLVED] Launchpad Pin 3 vs Pin 8

Recommended Posts

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

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Posted (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 by xeebot
left out one line

Share this post


Link to post
Share on other sites

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:

 

Screen Shot 2018-01-06 at 6.20.34 PM.png

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×