Fix whitespace errors

This commit is contained in:
Dhananjay Balan 2019-03-13 15:28:02 -04:00
parent eed134df58
commit 3e814e99da

View File

@ -26,7 +26,8 @@ cores](https://en.wikipedia.org/wiki/Magnetic-core_memory)) in earlier computers
made working with raster images hard, and plotters didn't need much operating made working with raster images hard, and plotters didn't need much operating
memory. memory.
## HP7440A ## HP7440A
HP7440A _"ColorPro"_ was an affordable plotter manufactured by HP, it can hold HP7440A _"ColorPro"_ was an affordable plotter manufactured by HP, it can hold
and switch between 8 pens simultaneously and draw on surfaces as large as A4. and switch between 8 pens simultaneously and draw on surfaces as large as A4.
[HP Museum has a longer post about this [HP Museum has a longer post about this
@ -39,16 +40,16 @@ easy it is to open, take that 2018 tech!
![7440A Top cover open](/images/7440a_open.jpg){ width=600px } ![7440A Top cover open](/images/7440a_open.jpg){ width=600px }
The internal mechanism is pretty simple, There are two servos. One for The internal mechanism is pretty simple, There are two servos. One for moving
moving the paper back and forward, and the other for moving the pen left and the paper back and forward, and the other for moving the pen left and right.
right. There is also a solenoid based lever to switch pen down and up. There is also a solenoid based lever to switch pen down and up.
## Talk To Me ## Talk To Me
![7440A Interfaces](/images/7440a_interface.jpg){ width=600px } ![7440A Interfaces](/images/7440a_interface.jpg){ width=600px }
However, our plotter didn't come with any cables to either power it or to send However, our plotter didn't come with any cables to either power it or to send
commands. commands.
Power supply was the biggest mystery. After digging through the manuals, and the Power supply was the biggest mystery. After digging through the manuals, and the
[hand drawn schematics from HP [hand drawn schematics from HP
@ -60,17 +61,16 @@ Communication turned out be just standard serial, however our plotter has a
`DB-22` adaptor, so we had to use a `DB-22` to `DB-9` adpator and then `DB-9` to `DB-22` adaptor, so we had to use a `DB-22` to `DB-9` adpator and then `DB-9` to
`usb` adaptor. `usb` adaptor.
The final step was writing in the only language the plotter can The final step was writing in the only language the plotter can understand,
understand, [`HP-GL`](https://en.wikipedia.org/wiki/HP-GL) or [`HP-GL`](https://en.wikipedia.org/wiki/HP-GL) or `HP Graphics Langauge`. Lucky
`HP Graphics Langauge`. Lucky for us, HP was on top of the plotter game when for us, HP was on top of the plotter game when plotters were popular, so `HP-GL`
plotters were popular, so `HP-GL` has become a de facto standard has become a de facto standard for talking to plotters.
for talking to plotters.
.. and finally our plotter moves! .. and finally our plotter moves!
<video width="600" height="450" controls> <video width="600" height="450" controls>
<source src="/images/7440a_printing.mp4" type="video/mp4"> <source src="/images/7440a_printing.mp4" type="video/mp4">
</video> </video>
## Goooooooo faster. ## Goooooooo faster.
@ -82,11 +82,11 @@ commands, however this made drawings really slow and added artifacts from
ink bleeding while the plotter is waiting for the next command. ink bleeding while the plotter is waiting for the next command.
Another recurser Francis pointed us to a clever hack in the [wait function] Another recurser Francis pointed us to a clever hack in the [wait function]
in [hpgl.js]. This function uses the HPGL command `OA;` to block execution in [hpgl.js]. This function uses the HPGL command `OA;` to block execution
until the plotter is finished with the current instruction. When the plotter until the plotter is finished with the current instruction. When the plotter
executes `OA;` it sends the current pen position, but it first needs to executes `OA;` it sends the current pen position, but it first needs to
wait until the pen has stopped moving. Thus we can batch a bunch of commands wait until the pen has stopped moving. Thus we can batch a bunch of commands
and append it with `OA;`. As soon as we see the position over the serial, and append it with `OA;`. As soon as we see the position over the serial,
we know that the previous batch is consumed and we can send the next batch of commands. we know that the previous batch is consumed and we can send the next batch of commands.
[wait function]: https://djipco.github.io/hpgl/hpgl.js.html#line1535 [wait function]: https://djipco.github.io/hpgl/hpgl.js.html#line1535
@ -159,7 +159,7 @@ drawing routine.
<video width="600" height="450" controls> <video width="600" height="450" controls>
<source src="/images/7440a_circle.mp4" type="video/mp4"> <source src="/images/7440a_circle.mp4" type="video/mp4">
</video> </video>
## This is only the beginning ## This is only the beginning