This file contains hidden or 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
// Ejemplo sencillo para usar la librer铆a MCAD para hacer una caja de borde redondeados. | |
use <MCAD/boxes.scad> | |
$fa=1; | |
$fs=0.4; | |
roundedBox(size=[10,20,30],radius=3,sidesonly=false); |
This file contains hidden or 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
% Acomodado de menor a mayor | |
\tiny | |
\scriptsize | |
\footnotesize | |
\small | |
\normalsize | |
\large | |
\Large | |
\LARGE | |
\huge |
This file contains hidden or 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
// Modificar el c贸digo para que la altura y grosor del tubo dependan de variables. | |
$fa = 1; | |
$fs = 0.4; | |
difference(){ | |
cylinder(10,5,5,center=true); | |
cylinder(11,4,4,center=true); | |
} |
This file contains hidden or 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
@startmindmap | |
*[#lightblue] ""git"" | |
**[#lightblue] ""add"" | |
*** ""archivo.txt"" | |
***[#lightblue] ""."" | |
****_ Agregar todos los archivos | |
**[#lightblue] ""clone"" | |
*** ""https://github.com/libgit2/libgit2"" | |
****_ Copiar-clonar un repositorio en l铆nea | |
**[#lightblue] ""commit"" |
This file contains hidden or 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
//!OpenSCAD | |
module grafica(dato1, dato2) { | |
union(){ | |
for (i = [0 : abs(5) : (dato1 * 360) / (dato1 + dato2)]) { | |
rotate([0, 0, i]){ | |
translate([25, 0, 0]){ | |
rotate([90, 0, 0]){ | |
color([0,0.6,0]) { | |
cylinder(r1=10, r2=10, h=1, center=false); |
This file contains hidden or 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
#include <Wire.h> | |
volatile byte x = 0; | |
volatile bool Recibido = false; // Flag to indicate new data | |
void setup() { | |
pinMode(9,OUTPUT); // Declarar la salida del actuador | |
Wire.begin(8); // Unirse al bus I2C con direcci贸n #8 (esclavo) | |
Wire.onReceive(recepcion); // Interrupci贸n de recepci贸n | |
Serial.begin(9600); // Iniciar el puerto serial (Debug) | |
delay(30);} | |
void loop() { |
This file contains hidden or 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
#include <Wire.h> | |
volatile byte x = 0; // Datos a recibir en el programa | |
void setup() { | |
Wire.begin(10); // Unirse al bus I2C con direcci贸n #10 | |
Wire.onRequest(transmision); // Interrupci贸n para mandar datos | |
delay(30); | |
x = (byte)(analogRead(A0) >> 2);} // El dato del sensor se inicializa con datos v谩lidos | |
/*El ADC del arduino tiene una resoluci贸n de 10 bits. Pero s贸lo queremos mandar un bye (8 bits) | |
El corrimiento en dos lugares analogRead(A0)(A0)>>2 asegura que s贸lo tengamos 8 bits | |
El cast a byte (byte) es una medida de seguridad para evitar casos extremos |
This file contains hidden or 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
#include <Wire.h> | |
volatile bool TransmitirDatos = false; | |
volatile bool RecibirDatos = false; | |
volatile byte x = 0; | |
void transmitir() { | |
TransmitirDatos = true; // Bandera para transmitir | |
} | |
void recibir() { | |
RecibirDatos = true; // Bandera para recibir |