cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
290 Views
Registered: ‎02-15-2019

How can I do this in SDK to control the buttons on NEXYS 3 board?

I wrote a game in C in SDK which it has a top level in VHDL in ISE, the game can control a ball to move up and down. I want to control the ball using the push buttons on my NEXYS 3 Spartan 6 board, how can I do to make the program know that when I press the button, it should do something.

for example:

I write:

static void move_ball(int d) {

	// if the down button is pressed move the ball down
	if (d == 1) {
		
		paddle[1].y += 5;
		
	}

How can I tell the program that the "d" means the down button(C9).

 

0 Kudos
1 Reply
Highlighted
Moderator
Moderator
231 Views
Registered: ‎10-06-2016

Hi @xxzjwydxwzy 

There are lot of missing information here that makes imposible to somebody to understand your use case :)

The NEXYS 3 board seems to be an Artix-7 device based board but you have not mentioned at all any processor (i.e. Microblaze) in your design, so not sure for which processor are you trying to create the program.

Please provide more details about your use case if you want people to provide replies to your post.

Regards


Ibai
Don’t forget to reply, kudo, and accept as solution.