Author Topic: I got an Arduino from a friend. What can I do with it?  (Read 263 times)

0 Members and 1 Guest are viewing this topic.

Offline jasc15

  • Posts: 4934
  • Gender: Male
  • TTAL: Yeti welcome
I got an Arduino from a friend. What can I do with it?
« on: April 07, 2017, 12:08:08 PM »
Seems like endless possibilities with these things.  I would like to build a nixie clock at some point, but what are some other small projects that would be fun?  I think besides the main board, there is an ethernet board and an 8 or so digit LCD display on a small breadboard.

Offline rumborak

  • DT.net Veteran
  • ****
  • Posts: 26451
Re: I got an Arduino from a friend. What can I do with it?
« Reply #1 on: April 07, 2017, 02:43:41 PM »
I can't speak for Arduino, but I started exploring Raspberry Pis about a year ago. I got one running as a Plex/media server now, and another one has infrared LEDs on a breadboard, to control my projector.
"I liked when Myung looked like a women's figure skating champion."

Offline jasc15

  • Posts: 4934
  • Gender: Male
  • TTAL: Yeti welcome
Re: I got an Arduino from a friend. What can I do with it?
« Reply #2 on: April 09, 2017, 02:52:48 PM »
I'm starting with making a digital clock using the LCD.  My first step is to display seconds with the counter resetting after 60.

Code: [Select]
  t=millis()/1000;
  s=t%60;

60 % 60 = 0
61 % 60 = 1
etc.

This should do it, but after 59, it displays 09, 19, 29, ...89, 99, 10, 11...

Whats going on here?

Offline rumborak

  • DT.net Veteran
  • ****
  • Posts: 26451
Re: I got an Arduino from a friend. What can I do with it?
« Reply #3 on: April 09, 2017, 04:50:58 PM »
No idea, that's pretty wild. I suggest printing out s and t on console.

Is this C, or Python? If it is C, what are the data types of s and t?
"I liked when Myung looked like a women's figure skating champion."

Offline jasc15

  • Posts: 4934
  • Gender: Male
  • TTAL: Yeti welcome
Re: I got an Arduino from a friend. What can I do with it?
« Reply #4 on: April 09, 2017, 05:30:55 PM »
s and t are integers.

int s, t;

Its apparently a simplified C or C++.

Edit: Ha, its been running for a few hours now, and it is counting down with negative numbers from -59, -58... -11, -10, -90, -80... -20, -10, -010.  Could this have anything to do with the control/connection of the LCD?

Edit2:  I added 't' to the display.  It counts 1 - 60, then 609, 619,... 699, 70, 71...  Buuuut, 's' now seems to display as expected.
 Strange stuff.

When I have it simply print t without calculating s, it counts as expected.  That seems to affect t...  Digging now.
« Last Edit: April 09, 2017, 07:01:40 PM by jasc15 »

Offline rumborak

  • DT.net Veteran
  • ****
  • Posts: 26451
Re: I got an Arduino from a friend. What can I do with it?
« Reply #5 on: April 09, 2017, 07:49:25 PM »
"-010" definitely is an issue with the displaying, as a -10 would just be displayed as -10.
"I liked when Myung looked like a women's figure skating champion."