Printer vanaf een CD-lezer (9 / 11 stap)

Stap 9: Basic-code


Definiëren CONF_WORD = 0x3f70
AllDigital ' Todos los pines del PORTA como E/S
TRISA = 0X00
TRISB = 0x00 ' Configuro el PORTB completo como salida.

Symbool van motorpen1 = PORTA.0
Symbool van motorpen2 = PORTA.1
Symbool van motora1 = PORTB.0
Symbool van motora2 = PORTB.1
Symbool van motorb1 = PORTB.2
Symbool van motorb2 = PORTB.3
Symbool van bobina1 = PORTB.4
Symbool van bobina2 = PORTB.5
Symbool van bobina3 = PORTB.6
Symbool van bobina4 = PORTB.7

PORTB = 0X00
PORTA = 0X00
Dim sleeptime As Byte
Dim sleeppap As Byte
Dim cambio als Bit
Dim fila As Byte
Dim fila2 As Byte
Dim fila3 As Byte
Dim fila4 As Byte
Dim fila5 As Byte
Dim bipo As Byte

bipo = 1
sleeppap = 2

Fila = 255
fila2 = 255
fila3 = 255
fila4 = 255
fila5 = 255

Cambio = True

Inicio:
botones:

GOSUB avanzarmotor1
GOSUB avanzarmotor1
GOSUB ecribirletra
GOSUB ecribirletra
Fila = 0
fila2 = 0
fila3 = 0
fila4 = 0
fila5 = 0
GOSUB ecribirletra
GOSUB ecribirletra

' aca empieza el codigo

' aca termina el codigo

Fila = 0
fila2 = 0
fila3 = 0
fila4 = 0

Goto botones

Einde

ecribirletra:

Als fila5.7 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.6 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.5 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.4 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.3 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.2 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.1 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila5.0 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.7 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.6 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.5 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.4 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.3 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.2 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.1 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila4.0 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.7 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.6 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.5 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.4 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.3 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.2 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.1 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila3.0 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.7 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.6 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.5 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.4 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.3 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.2 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.1 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila2.0 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.7 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.6 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.5 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.4 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.3 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.2 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.1 = True Then
GOSUB bajarlapicera
Endif
GOSUB moverhorizontal
Als fila.0 = True Then
GOSUB bajarlapicera
Endif
GOSUB volvertodo
GOSUB avanzarmotor1
Terugkeer

bajarlapicera:
motorpen1 = 1
motorpen2 = 0
WaitMs 102
motorpen1 = 0
motorpen2 = 1
WaitMs 102
motorpen1 = 0
motorpen2 = 0
WaitMs 102
Terugkeer

moverhorizontal:
bipo = bipo + 1
Als bipo = 5 dan bipo = 1
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
Terugkeer

moverhorizontalatras:
bipo = bipo + 1
Als bipo = 5 dan bipo = 1
PORTB = 0
motora2 = 1
motorb1 = 1
WaitMs 6
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs 6
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs 6
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs 6
PORTB = 0
Terugkeer

volvertodo:
Dim y As Byte
Voor y = 0 tot en met 41
motora2 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
motora2 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb2 = 1
WaitMs sleeppap
PORTB = 0
motora1 = 1
motorb1 = 1
WaitMs sleeppap
PORTB = 0
Volgende y
PORTB = 0
Terugkeer

avanzarmotor1:
Als cambio = True Then
Cambio = False
Anders
Cambio = True
Endif

Als cambio = True Then
PORTB = 0
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina1 = 1
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina3 = 1
WaitMs sleeptime
PORTB = 0
Anders
PORTB = 0
bobina3 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
Endif
Terugkeer

retrocedermotor1:
Als cambio = True Then
Cambio = False
Anders
Cambio = True
Endif
Als cambio = True Then
PORTB = 0
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
bobina4 = 1
WaitMs sleeptime
PORTB = 0
bobina3 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina3 = 1
WaitMs sleeptime
PORTB = 0
Anders
PORTB = 0
bobina2 = 1
WaitMs sleeptime
PORTB = 0
bobina2 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina1 = 1
WaitMs sleeptime
PORTB = 0
bobina4 = 1
bobina1 = 1
WaitMs sleeptime
PORTB = 0
Endif
Terugkeer

Gerelateerde Artikelen

Dot matrixprinter vanaf een CD/DVD-lezer met Arduino

Dot matrixprinter vanaf een CD/DVD-lezer met Arduino

Hey!Enige tijd geleden tijdens het doorlopen van de pagina's hier in Instructables, iets mijn aandacht vangen, een printer gemaakt van een CD-lezer, en ik was verbaasd.Ik dacht: "Dit is ongelooflijk, ik heb een te maken!"Ik weet dat dit soort pr
Inschakelen automatische herverdeling voor uw 3D-Printer met een inductieve sensor (Marlin Firmware)

Inschakelen automatische herverdeling voor uw 3D-Printer met een inductieve sensor (Marlin Firmware)

Dit Instructable heeft betrekking op het opzetten van automatische herverdeling voor uw 3D-printer met behulp van Marlin firmware typisch voor veel 3D printers zoals Makerfarm kits en anderen die gebruikmaken van HELLINGBANEN 1.4 + Arduino gebaseerd
Hoe u kunt besturen van een 3D-Printer met een telefoon via DIY AstroBox

Hoe u kunt besturen van een 3D-Printer met een telefoon via DIY AstroBox

Dit Instructable zal u tonen hoe een Raspberry Pi-afdrukserver instellen zodat u kunt controleren en bewaken van uw 3D-printer op afstand (met inbegrip van externe snijden) van een telefoon, tablet of computer.Draadloos printenNatuurlijk, is het bela
Controle van de kalibratie op uw TechShop 3D-Printer (of een willekeurige andere 3D Printer)

Controle van de kalibratie op uw TechShop 3D-Printer (of een willekeurige andere 3D Printer)

3D printers zijn groot.  En als u slechts weinig standbeelden van Mickey Mouse, Yoda of kikkers afdrukt te zitten op uw bureau dan kans op het dimensionale vermogen van de printer is waarschijnlijk dicht genoeg zodat u een fatsoenlijk uitziend model.
Maken van een Live USB te starten vanaf een USB drive

Maken van een Live USB te starten vanaf een USB drive

Een Live USB laat je uitvoert van een besturingssysteem op een USB-drive, dus u kunt proberen een besturingssysteem zonder een partitie, of voeren een favoriete transactie met u, of hebben een emergency back-up voor het geval uw computer vastloopt.In
Retro stereo patch kabels vanaf een USB-kabel

Retro stereo patch kabels vanaf een USB-kabel

deze eenvoudige Instructable zal u tonen hoe maak je een 3.5mm stereo patch-kabel met een retro flare, vanaf een usbkabel, een schoenveter en een paar stereo pluggen.Wat is een stereo patch-kabel, je kunt je afvragen? Er is een stereo patch-kabel voo
Bescherming van uw 3D Printer - Build een Lasergesneden en 3D afgedrukt behuizing

Bescherming van uw 3D Printer - Build een Lasergesneden en 3D afgedrukt behuizing

op mijn middelbare school, is een 3D-printer onlangs gedoneerd aan ons Project leiden de manier (PLTW) programma door Lulzbot. De printer is een uitstekende toevoeging aan de klas, zoals onze andere printer was beginnen te vertonen tekenen van leefti
Windows7 aan een Acer-Netbook installeren vanaf een USB Flash Drive

Windows7 aan een Acer-Netbook installeren vanaf een USB Flash Drive

dit is een How-To voor het installeren van Windows7 aan een Acer-Netbook vanaf een USB flash drive.Vereisten:USB schicht toer (min 4GB)Windows 7-DVD of ISO-image (32 bit)MBRWizard (downloaden)Stap 1: Extract MBRWizard & formaat USB Flash DriveDownloa
Mallen rechtstreeks vanuit een 3D-printer aan een injectie molder

Mallen rechtstreeks vanuit een 3D-printer aan een injectie molder

In dit Instructable zal ik het proces van een experiment heb ik gewerkt aan test vrij lage druk spuitgieten met behulp van 3D-gedrukte mallen document.U moet zitten kundig voor alles wat die u nodig hebt voor dit project te leggen rond uw huis:-Een e
Opladen van een object vanaf een afstand

Opladen van een object vanaf een afstand

In deze video ziet u hoe ik betalen een bladgoud elektroscoop vanaf een afstand.Het lijkt erop dat de elektroscoop van de max in het proces laste ten.Ik ben van plan om uit te leggen van de fysica achter het proces in een later instructable.Stap 1: O
Elke linux installeren vanaf een usb de easy way

Elke linux installeren vanaf een usb de easy way

Ben je moe van al uw schijven te verspillen op Linux distro's?Misschien is het cd-rom-station is gebroken?Misschien bent u gewoon te cool voor oude tech zoals CD's?In dit Instructable ga ik u tonen hoe om linux te installeren vanaf een USB, de gemakk
Gebruik SSH en XMing Display X programma's vanaf een Linux Computer in een Windows-Computer

Gebruik SSH en XMing Display X programma's vanaf een Linux Computer in een Windows-Computer

als u Linux op het werk, en Windows thuis gebruikt, of omgekeerd, u soms moet inloggen op de computer op de andere locatie, en programma's uitvoeren. Nou, kunt u Installeer een X-Server, SSH Tunneling met uw SSH-Client inschakelen en een VNC zowel ex
Hoe te zetten muziek vanaf een CD naar een iPad

Hoe te zetten muziek vanaf een CD naar een iPad

dit instructable leert u hoe te zetten muziek vanaf een CD op een iPad of elk iDevice.  Vergeet niet, ik heb niet gebruikt een iMac of Mac veel, dus ik weet niet hoe het te doen op een Mac.  Vanwege dat weet ik alleen hoe te om het te doen op Windows
Schoen en Run Ubuntu vanaf een Flash Drive

Schoen en Run Ubuntu vanaf een Flash Drive

met een besturingssysteem, zoals Windows, op uw flash-drive soms zeer nuttig kan zijn. U kunt uw gegevens herstellen vanaf een harde schijf en kopieer deze naar een externe harde schijf als die computer zal niet opwaarts schoen of die computer op vir