Finishing up my Mini-Sumo

Hello everyone, I have a Mini-Sump competition coming up in about a week and I've got a handle on the basics such as making motors go. Unfortunately I need some guidance with some of the more complicated issues.

Firstly I have no idea how to make my LED screen work. I've attached what screen I'm using as well as what board I'm using. I've followed guides and used sample programs but it just doesn't work. I've soldered wires from the LED holes on the board to the LED holes on the LED. There no markings so I assume it doesn't matter what order I put them in but if there a certain way please let me know so I can fix it and try again. I would love to get it working properly for the competition but it's not a major issue if I can't.

Secondly I seem to have a shortage of buttons on my board and I would love to not have to solder more on if I don't have to. Is it possible to make robot do something like drive forward if I press button A but drive backwards if I press button A twice? Also is it possible to program reset to do something other then just reset the program? Would it even be wise to?

Sorry for any questions I have that may seem dumb, I've really held off on asking questions on here as I tried to Google my way through coding. If there anything more you need from me then let me know. Thanks in advance for any and all advice!

My controller: Pololu - A-Star 32U4 Prime SV microSD

My LED: https://www.pololu.com/product/356

First off: that is an LCD screen, not LED.

Jlawler:
I've soldered wires from the LED holes on the board to the LED holes on the LED. There no markings so I assume it doesn't matter what order I put them in

Don't do that. There is a pinout diagram on the product page that you linked. The pins have definite functions and need to be connected up correctly. If you have connect the power pins the wrong way around you've probably killed the display- best case scenario is that you haven't hooked up the power pins to the power supply of you Arduino at all, and hopefully haven't killed the display.

Jlawler:
Secondly I seem to have a shortage of buttons on my board and I would love to not have to solder more on if I don't have to. Is it possible to make robot do something like drive forward if I press button A but drive backwards if I press button A twice?

Absolutely. If I were you I would start by Googling something like "Arduino double click".

Jlawler:
Also is it possible to program reset to do something other then just reset the program? Would it even be wise to?

It is technically possible to use the reset pin as an IO, but it is quite involved and you won't be able to upload code like normal. If you have to ask then it isn't something you want to try messing around with.

Thanks for the advice so far. My screen seems to be wired correctly(maybe I did know what I was doing and forgot) but I still can't seem to really make it work. I might just need to play with it a bit more though.

I also have encountered that for some reason there seems to be no good guide to programming basic IR sensors. I have two parts 1 freq-out and 1 receiver. I have no idea how to program them. I just want to send out the pulse and if it sees something it will do one thing but if it doesn't then it will do another. Any help or guides for this?

Jlawler:
Thanks for the advice so far. My screen seems to be wired correctly(maybe I did know what I was doing and forgot) but I still can't seem to really make it work. I might just need to play with it a bit more though.

Do you have the contrast control pot connected correctly?

Jlawler:
I also have encountered that for some reason there seems to be no good guide to programming basic IR sensors. I have two parts 1 freq-out and 1 receiver. I have no idea how to program them. I just want to send out the pulse and if it sees something it will do one thing but if it doesn't then it will do another. Any help or guides for this?

I don't know what transmitter/receiver hardware you have (hinthint) but I would start with either of these.

Sorry I haven't had time to check my screen more yet so I can't respond definitely until tomorrow.

As for the IR sensors I'm using basic two system, one pluses out and one receives the pulse like what the first guide showed. It's on a sensor bar which has a total of 5 of these pairs. I attached a picture to my original post. Each input is attached separately to my board but my out is all the same and is connected to a single pin. Basically I need help learning how to send a freqout( or whatever it's called in Arduino) for all of them and as the robot receives that data showing whether something is in front of each sensor it will react accordingly. I hope that made sense.

So you're not looking to transmit modulated data over the IR, but instead want to be able to see which of the sensors are being hit by the IR from the LED at any given time?

Yes, sorry I struggled to put it into words before.

Sure. So what frequency are the IR receivers? You'll need to adjust the PWM output frequency to match but I should be able to steer you in the right direction.
I'll save you some headache right now and point out that you (probably- I still don't know the exact sensor that you're using (HINT)) won't be able to leave the IR LED constantly transmitting. Those IR receivers are designed to accept fairly short commands and if they are exposed to IR constantly then they basically stop working. So you'll probably want to turn the IR LED on and then off quickly- for example have it on for 30mS and then off for 70mS.
You'll need to think about how you're going to read all five sensor inputs, and then also have a way of seeing if it has been more than 70mS since any of the sensors has been tripped.

It appears to be 38 kHz but I've asked my friend who gave me the sensor bar and am waiting to hear back. He normally uses it with Basic Stamp so I'm kind of on my own with programming.

Luckily I'll only be using 3 inputs. So my research tells me I should use analog read but that would only tell me what it is, it won't tell my robot what it is. So are there other ways for me to get it read and given to my robot?

Again any help with starting to program my IR sensor would be much appreciated, it's basically the only thing holding me back. I just need to know how to send out the pulse, read it return, and react accordingly. Are there any libraries, guides (that don't focus on remotes), hints? I honestly have no idea what I'm doing otherwise I would have given any code I could have created for this. I'll update as I learn more. Just getting nervous as the competition is in a few days.

Jlawler:
It's on a sensor bar which has a total of 5 of these pairs. Each input is attached separately to my board....

Jlawler:
Luckily I'll only be using 3 inputs.

I'm curious as to how you plan to connect five sensors to three inputs?

Jlawler:
So my research tells me I should use analog read

Those sensors are open-drain output, so you won't use analogRead.

Jlawler:
but that would only tell me what it is, it won't tell my robot what it is.

This doesn't make sense.

I am only using three sensors since 2 of the five are pretty much worthless. Here is some of the only code I found.

Void setup () {
Pinmode (x,input);
Pinmode (y, output);
Serial.begin(9600);
}

void loop (){

Serialprintin(analogread (x));
Delay (100);
If analogread(x) < 250)
//run motors one way
Else 
//run motors another way
}

I've just had a look a proper look at the picture of the sensor bar on my computer rather than my phone. It looks like the IR LEDs might be mounted on the bar next to the IR sensors themselves. Are you trying to sense when there is an object close to a particular sensor, rather then sensing when an IR LED 'beacon' is in range of a particular sensor?

Jlawler:
I am only using three sensors since 2 of the five are pretty much worthless. Here is some of the only code I found.

Void setup () {

Pinmode (x,input);
Pinmode (y, output);
Serial.begin(9600);
}

void loop (){

Serialprintin(analogread (x));
Delay (100);
If analogread(x) < 250)
//run motors one way
Else
//run motors another way
}

This code is never going to compile as it is, where did you get it from?

I got it from YouTube and yes I am. I just want to know when a object is in front of a sensor or not in front of it.

Main task of my mini sumo is to push another robot away but in order to push it I have to have my robot be able to detect it.