Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HA! I've been struggling too! I'm trying to display a random number that is determined on the start of main to the screen.

It is FREAKING RIDICULOUS that it is this hard to even do something as simple as that. The problem comes from all the damn variable types! Why cant i sprintf an int to a char and set statetext to char? Its bad enough that there isn't a simple Butterfly LCD library that lets you display an int, char array, or whatever! GAH!

I like C better on the computer! :x :oops: :cry:

Math is cool.
jevinskie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's quite pointless to followup to such an old thread, so I've taken
the liberty to split off your new submission into a topic of its own.

It is FREAKING RIDICULOUS that you can't even express your very own
problem, let alone you show any sign that you've read the `intro'
article (on top of the list).

> Why cant i sprintf an int to a char ...

Because a char can just hold a single character, so it makes no sense
whatsoever to `sprintf something into it'.

Character IO on a microcontroller is by far a more complex task than
the very beginner (coming from a universal computer's background)
might assume; thus the typical ``Hello world''-style application on
the microcontroller (used to get acquainted to the development
environment as a first step) is something like flashing a LED. That's
exactly the reason why demo.c in the avr-libc is there, and there is
plenty of commentary for it.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.