leQuack's instructable
Tell us about yourself!
Achievements
- leQuack favorited HYBRID DRONE by palani.12.12
- leQuack commented on leQuack's instructable Tic Tac Toe on the Arduino With Multiplexing
- leQuack commented on leQuack's instructable Tic Tac Toe on the Arduino With Multiplexing
I uploaded a new version of LedControl.h, which fixes my mistake in the orientation of the leds. I also uploaded a new version of Test3_2.ino, since I also wrote that using the setup I made with the reversed leds. I mistakenly thought the simulator I used (circuits.io) couldn't properly handle it (since the hardware was showing me different things and I know some extra effort must have gone into making such a thing work in a simulator). But the simulator works just fine with it:).It might take a short while before the Instructable is updated. I changed the values of all outputs connected to the LEDs (HIGH (5v) to LOW (0v) and vica versa), which flipped the direction of the current flow. It still flows on the exact same paths, but just in the opposite direction.
View Instructable »I uploaded a new version of LedControl.h, which fixes my mistake in the orientation of the leds. I also uploaded a new version of Test3_2.ino, since I also wrote that using the setup I made with the reversed leds. I mistakenly thought the simulator I used (circuits.io) couldn't properly handle it (since the hardware was showing me different things and I know some extra effort must have gone into making such a thing work in a simulator). But the simulator works just fine with it:).It might take a short while before the Instructable is updated. I changed the values of all outputs connected to the LEDs (HIGH (5v) to LOW (0v) and vica versa), which flipped the direction of the current flow. It still flows on the exact same paths, but just in the opposite direction.
- leQuack followed PaulMakesThings
- leQuack's instructable Tic Tac Toe on the Arduino with Multiplexing's weekly stats:
- leQuack followed metalworking and woodworking channel
- leQuack favorited DIY RC Drone by dexLab
I set the buttons in such a way that each button can make a unique connection between two wires. No buttons are allowed to (be able to) connect the same two wires as other buttons!For example: if you look at the schematic image in step 5, you can see that the button in the top left (of the left board) connects the green and grey wires. These two wires can only connect to each other, if that specific button is pressed, and nowhere else. These unique combinations are made everywhere.Sidenote: The arrays represents the left breadboard in the schematic. The same coordinates are mirrored for the right breadboard, which you can see applied in the function "convert_button_white_x(..)". I'll ignore that difference for now and focus on the left breadboard.Each wire is connected to a pin.…
see more »I set the buttons in such a way that each button can make a unique connection between two wires. No buttons are allowed to (be able to) connect the same two wires as other buttons!For example: if you look at the schematic image in step 5, you can see that the button in the top left (of the left board) connects the green and grey wires. These two wires can only connect to each other, if that specific button is pressed, and nowhere else. These unique combinations are made everywhere.Sidenote: The arrays represents the left breadboard in the schematic. The same coordinates are mirrored for the right breadboard, which you can see applied in the function "convert_button_white_x(..)". I'll ignore that difference for now and focus on the left breadboard.Each wire is connected to a pin. For me, it's easiest to think that those pins represent the "coordinates" that the Arduino 'sees'. However, those coordinates don't match the actual physical coordinates of the buttons because of the wiring. The 2 2d arrays contain the actual physical coordinates of the buttons, which are located at the Arduino "coordinates". To fill this array, it's best to follow the wires towards the board. For this code, I chose that the analog wires/pins represent the x coordinates and the digital wires/pins represent the y coordinates of the 2d arrays.For example: the green and grey wires. The green wire is connected to digital pin 11 (BUTTON_POWER_PIN_1). It's the first pin out of three (as can be seen from the order of the "button_power_pins" array), so we'll assign this "Arduino coordinate" y = 0 (we start counting at 0). The grey wire is connected to analog pin 2 (BUTTON_RED_3), the third pin out of three (as can be seen from the order of the "button_red_pins" array), so "Arduino coordinate" x = 2. If you track those two wires in the schematic, you'll find that they are both connected to the same button at column 0, row 0. These are the values which are inserted in the arrays at indices [2][0]. So, button_conversion_x[2][0] == (column) 0, and button_conversion_y[2][0] == (row) 0.So with the found actual coordinates, we can control the leds. The pins of the leds do match the actual coordinates, so no more conversion is necessary.