This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
image_folder = sys.argv[1] if len(sys.argv) == 2 else '.' | |
folder_path = os.path.abspath(image_folder) | |
svg_images = [os.path.abspath(f) for f in os.listdir(folder_path) if f.endswith('.svg')] | |
for image_file in svg_images: | |
filename, ext = os.path.splitext(image_file) | |
os.system("inkscape -z -e {}.png {}".format(filename, image_file)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet | |
pyglet.options['shadow_window'] = False | |
window = pyglet.window.Window() | |
print("OpenGL info:") | |
print(window.context.get_info().get_version()) | |
print(window.context.get_info().get_renderer()) | |
print(window.context.get_info().get_vendor()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyglet | |
required_extensions = [ | |
'GL_ARB_framebuffer_object', | |
'GL_EXT_framebuffer_object', | |
'GL_EXT_framebuffer_blit', | |
'GL_EXT_framebuffer_multisample', | |
'GL_EXT_packed_depth_stencil', | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PIN MAPPINGS | |
// | |
const int num_relays = 8; | |
const int relays[] = {2, 3, 4, 5, 6, 7, 8, 9}; | |
const int input_pin = A0; | |
const int input_threshold = 50; | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int num_relays = 8; | |
const int relays[] = {2, 3, 4, 5, 6, 7, 8, 9}; | |
const int duration = 1000; | |
void setup() { | |
for (int i = 0; i < num_relays; i++) { | |
pinMode(relays[i], OUTPUT); | |
digitalWrite(relays[i], HIGH); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* LIGHT AVOIDER ROBOT | |
* | |
* A simple Arduino based obstacle avoider robot that uses two light dependent resistors to | |
* measure the amount of light in its environment and then move to the area with less light. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* LINE FOLLOWER ROBOT | |
* | |
* An Arduino based robot that uses an infrared sensor array to follow a line. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Callibration sketch for the accelerometer. | |
* | |
* Simply prints out the values from the x, y, and z axes to the serial monitor. These values can be | |
* used to calibrate the sensor. | |
* | |
* To use this code with the tilt controlled robot, keep the accelerometer flat and then record the | |
* readings for x and the y axes. The calibrated_x and calibrated_y in the tilt-robot sketch should | |
* be set to these base values. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* BASIC ARDUBOT | |
* | |
* A simple Ardubot that demonstrates a basic set of movements. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Joystick Controlled Robot | |
* | |
* An arduino based robot that can be controlled using an analog joystick. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) | |
*/ |