This is the code to blink a LED on a GPIO on an ESP8266-1 loaded with NodeMCU. What is of particular interest is the GPIO0 and GPIO2 values.
GPIO0=3 GPIO2=4 pin = GPIO0 gpio.mode(pin, gpio.OUTPUT) lighton=0 tmr.alarm(0,1000,1,function() if lighton==0 then lighton=1 gpio.write(pin, gpio.HIGH) -- 512/1024, 50% duty cycle else lighton=0 gpio.write(pin, gpio.LOW) end print(lighton) end)
I challenged a friend to connect a micro-controller to a Raspberry Pi. I chose to use an ATMega168 programmed in C while he preferred to use a Microchip PIC programmed in ASM. Not that I don’t like ASM, but it took me only 45 minutes to get all the material together and blink some LEDs from a shell. To get thinks up very fast, I used a BugOne board. This is clearly an advantage for me since it is already assembled with an ISP connector and ready to use.
This one of my last prints, a Kryptonian Key [Ecogeeco] inspired from Man of Steel movie. I decided to print it in transparent PLA to allow insertion of a LED. Continue reading “Everything is better with a LED”
It’s been a while since my last blink on this blog. Today I’m gonna blink 64 LEDs … I mean an 8×8 LED matrix. This article is about driving a LED matrix from a MAX 7219 with a BugOne board (code for Arduino also provided).
Today, I’m improving my previous article on RFM12 communication implementing a bidirectional communication between two BugOne boards.
To ensure a bidirectional communication is really happening, I’ll be using the code from BugOne’s github project: app_noapp_skel. This project basically takes any messages received by the RFM12 and sends it back reverted.
Today I decided to take the MAX6969 sample a step further using Pulse Width Modulation (PWM) to vary LEDs intensity.
I recently ordered a bunch of sample MAX6969 from MAXIM. These are 16 ports current LED drivers I’m planning to use to drive optoisolators (MOC3041). In my first attempt, I used an Arduino plus a bunch of LED and made them blink of course.