[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Your best Arduino tricks
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 11
Thread images: 2
File: 48912-arduinouno_r3_front.jpg (1022 KB, 1800x1244) Image search: [Google]
48912-arduinouno_r3_front.jpg
1022 KB, 1800x1244
Post your coolest Arduino tricks that you ever made or try.
>>
I wrote an arduino sketch that lets my arduino collect dust in my drawer.
>>
>>51456577
I wrote one that makes blink a led every 2 seconds, I applied to Harvard but they were afraid that I would bomb the campus
>>
>>51456597
Lol
>>
File: 892991578.jpg (32 KB, 400x422) Image search: [Google]
892991578.jpg
32 KB, 400x422
I tried to use one to make a pipboy local mapping function with a ping sensor.
>>
>implying anyone on /g/ actually creates anything instead of just consuming
>>
>>51456769
you should post the code for 'proof'
>>
>>51456830
# import time module
import time

# import gpio module
import RPi.GPIO as GPIO

# start time variable
alpha = 0

# stop time variable
beta = 0

# total time variable
gamma = 0

# while loop control failsafe variable
delta = 0

# distance in centimeters
distCM = 0

# distance in inches
distIN = 0

# set up gpio pin 11 as output to parallax ping
GPIO.setup(11, GPIO.OUT)

# be sure there is no signal to parallax ping: pin 11, 0 = False
GPIO.output(11, 0)

# send parallax ping a high signal: pin 11, 1 = True
GPIO.output(11, 1)

# set up gpio pin 11 as input from parallax ping
GPIO.setup(11, GPIO.IN)

GPIO.input(11)

# while gpio is false(0)
while GPIO.input(11) == 0 and delta < 20:
delta = delta + 1
print "A", delta
else:
# start time
alpha = time.time()

delta = 0

# while gpio is true(1) and delta loop control failsafe is less than 20
while GPIO.input(11) == 1 and delta < 20:
# add one to delta as while loop failsafe
delta = delta + 1
print "B", delta
else:
# stop time
beta = time.time()
# calculate total time
gamma = beta - alpha
# print parallax ping value
print gamma

# Alucard
print "What!"

# calculate centimeters from time traveled
distCM = (34480 * gamma) / 2

# print distance in centimeters
print "%.1f" % distCM, "centimeters"

# calculate inches from centimeters
distIN = distCM / 2.54

# print distance in inches
print "%.1f" % distIN, "inches"
>>
>>51456843
fake
>>
>>51456905
It was a Raspberry Pi with a Ping sensor connected to it. The product failed when the Pi I realized couldn't handle the proper timing. It also had an arduino temp sensor I was working on.
>>
I programmed one to control LED lights on my stairs wirelessly when it senses movement.
Thread replies: 11
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.