Forum Discussion
Altera_Forum
Honored Contributor
13 years agookay, so i havekind of read up on sprintf
this is what my code has now
# include <stdio.h>
# include "altera_up_avalon_character_lcd.h"
# include "altera_up_avalon_character_lcd_regs.h"
int rddata;
char buff ;
int value ;
//rddata recieved from other part of code
//
// HERE
//
//end other part of code
value=sprintf (buff, "%d", (rddata*100)/511 );
alt_up_character_lcd_dev * char_lcd_dev;
char_lcd_dev = alt_up_character_lcd_open_dev ("/dev/LCD");
alt_up_character_lcd_init(char_lcd_dev);
alt_up_character_lcd_string(char_lcd_dev,"reflection = ");
alt_up_character_lcd_set_cursor_pos(char_lcd_dev,13,0);
c(char_lcd_dev, "%s", buff);
i get the error in the last line "too many arguments to function alt_up_character_lcd_string" how do i format this?