Today I have released the first version of my arduino sketch that allows you to use the android app touchDRO with cheap chinese callipers.
https://github.com/mlueft/drocc
In the next days I'll add infos about circuits and configuration.
www.lueftenegger.at
Montag, 2. April 2018
Sonntag, 31. Dezember 2017
windows 10 + Reprap NEO + USB Serial
This is more a note for myself when I have to install the printer again, than a blog post :-)
I have got a used Reprap NEO which I had to repair. After doing the hardware stuff I had problems installing the printer on my Win10 machine. A "USB Serial" device was recognized in the device manager, but no driver was installed and I couldn't find any info about the chipset on the manufacturer's website. (To be honest I was too lazy to open the device's case again :-) )
On my other laptop the printer worked immediatly, so I installed the same driver on my first machine.
This is my web search:
https://duckduckgo.com/?q=usb+serial+pjrc.com&t=ffsb&ia=web
On this page I found the driver:
https://www.pjrc.com/teensy/usb_serial.html
The printer is the device on COM4:
I have got a used Reprap NEO which I had to repair. After doing the hardware stuff I had problems installing the printer on my Win10 machine. A "USB Serial" device was recognized in the device manager, but no driver was installed and I couldn't find any info about the chipset on the manufacturer's website. (To be honest I was too lazy to open the device's case again :-) )
On my other laptop the printer worked immediatly, so I installed the same driver on my first machine.
This is my web search:
https://duckduckgo.com/?q=usb+serial+pjrc.com&t=ffsb&ia=web
On this page I found the driver:
https://www.pjrc.com/teensy/usb_serial.html
The printer is the device on COM4:
Freitag, 13. Januar 2017
Repairing an Epson HX-20
Today I could complete the restoration of an Epson HX-20 I have got some weeks ago on willhaben.at for free.
The first inspection resulted in some damaged capacitors and a missing battery pack. This ended in strange behavior because the device doesn't work correctly if the internal battery is missing, even if it is connected to an external power supply.
There is one interesting point, that could be helpful to others too. Some parts of the memory is always turned on to keep time and stored programs. Sometimes this memory gets confused and needs to be reset. This happened if you see strange characters after turning it on, or you don't get to basic from the start up menu. Firstly I thought one of the ram chips is damaged. Normally this reset is done by pressing CRTL+@. My device has got a germen keyboard layout and there is no @ sign. On my device I had to press CRTL+§ (Control+shift+3)
p.s.: Like on many other 8-Bitters from the 80s like the C64 and C128, the basic is from Microsoft :-)
The first inspection resulted in some damaged capacitors and a missing battery pack. This ended in strange behavior because the device doesn't work correctly if the internal battery is missing, even if it is connected to an external power supply.
There is one interesting point, that could be helpful to others too. Some parts of the memory is always turned on to keep time and stored programs. Sometimes this memory gets confused and needs to be reset. This happened if you see strange characters after turning it on, or you don't get to basic from the start up menu. Firstly I thought one of the ram chips is damaged. Normally this reset is done by pressing CRTL+@. My device has got a germen keyboard layout and there is no @ sign. On my device I had to press CRTL+§ (Control+shift+3)
p.s.: Like on many other 8-Bitters from the 80s like the C64 and C128, the basic is from Microsoft :-)
Labels:
classic computer,
diy,
electronics,
repair
Samstag, 17. September 2016
Mendelbrot
Flash player is requires for this post!
Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.
This is no informative post, but I like mandelbrot :-)
Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.
This is no informative post, but I like mandelbrot :-)
plasma
Flash player is requires for this post!
Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.
Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.
You can reload the page to see different effects.
Some weeks ago I needed some eye candy for my latest
game. The easiest way was to put some plasma in the background. But
mostly plasma algorithms generate a repetitive pattern and i wanted a
better one.
I found this post in david's blog: http://www.gibbongames.com/?p=167
Unfortunatley this program is written in blitzmax, a
language I don't know at all. But the syntax is easy to understand, so
it took just some hours to port it.
I have added one nice feature. You can define how
many lines are calculated by render circle. So you can screw down the
fps of the plasma effect and use the CPU for what you really want to do.
download: click hear to download a demo project.
p.s.: My favourite line of code in this project is
if ( ubyte[plasma_id] & 128 )
ubyte[plasma_id] = (~ubyte[plasma_id])&0x7F;
ubyte[plasma_id] = (~ubyte[plasma_id])&0x7F;
It's a very good example of the power of bit operation.
The flash version is from 2010.
In the meanwhile I wrote a javascript version too:
(Drag the mouse to animate and rotate color.)
Interactive Plasma written in java script.
The flash version is from 2010.
In the meanwhile I wrote a javascript version too:
(Drag the mouse to animate and rotate color.)
Interactive Plasma written in java script.
rendering ISO-tiles with blender
Back in 2009 I had a blog about flash game development. After taking it
offline I've got some requests to put some content back online. Today I
found a backup of the blog and some posts still seem to be interessting
to me. So I'll repost some of them here. This is one of them.
For a project I am planning I want to render iso tiles with blender. After some research with google and in some blender forums, I just found no satisfying solutions. So I had to build up something myself. First let's consider the situation in an iso game to get some cornerstones for our system to work efficiently.
1. Buildings and landscape tiles need to be rendered from four directions.
2. Creatures need to be rendered from four or eight directions depending on the game design.
This leads to a render scene with eight cameras.
3. We need a system to synchronize all properties, positions and angles of all cameras. This makes the perspective of an object stays the same if we use the images of a different camera in the game.
That leads to a system where:
- all eight cameras are looking exactly at the same point.
- all eight cameras are at the same distance of the focus point. So, their positions are building a circle around the the focus point with an angle of 45 degrees between each camera.
- all eight cameras have exactly the same properties, like focal distance, ...
I am not an expert in blender, so it took me some hours to build up a system providing all that points.
How does it work:
1. I created an empty at {0,0,0} and named it "camTarget". This is the focus point.
2. I created a circle at {0,0,10} and named it "camCircle.001".
3. I created a camera and named it "cam.001". To this camera I added two constraints.
a) a FollowPath to "camCircle.001".
b) a TrackTo to camTarget.
4. I repeated these steps eight times, where I duplicated the camera with ALT+D to secure all cameras will have the same properties.
5. Each camCircle is rotated +45 degrees.
6. I added an empty and named it "camRing" all camCircles are child object of this empty.
7. I added an empty and named it "camAll" camRing and camTarget are child objects of this empty.
8. I locked some properties to allow the three empty just to move along the z axis.
That's it.
To change the perspective you can drag camTarget and camRing. To lift the whole system without changing the perspective you can drag camAll.
For a project I am planning I want to render iso tiles with blender. After some research with google and in some blender forums, I just found no satisfying solutions. So I had to build up something myself. First let's consider the situation in an iso game to get some cornerstones for our system to work efficiently.
1. Buildings and landscape tiles need to be rendered from four directions.
2. Creatures need to be rendered from four or eight directions depending on the game design.
This leads to a render scene with eight cameras.
3. We need a system to synchronize all properties, positions and angles of all cameras. This makes the perspective of an object stays the same if we use the images of a different camera in the game.
That leads to a system where:
- all eight cameras are looking exactly at the same point.
- all eight cameras are at the same distance of the focus point. So, their positions are building a circle around the the focus point with an angle of 45 degrees between each camera.
- all eight cameras have exactly the same properties, like focal distance, ...
I am not an expert in blender, so it took me some hours to build up a system providing all that points.
How does it work:
1. I created an empty at {0,0,0} and named it "camTarget". This is the focus point.
2. I created a circle at {0,0,10} and named it "camCircle.001".
3. I created a camera and named it "cam.001". To this camera I added two constraints.
a) a FollowPath to "camCircle.001".
b) a TrackTo to camTarget.
4. I repeated these steps eight times, where I duplicated the camera with ALT+D to secure all cameras will have the same properties.
5. Each camCircle is rotated +45 degrees.
6. I added an empty and named it "camRing" all camCircles are child object of this empty.
7. I added an empty and named it "camAll" camRing and camTarget are child objects of this empty.
8. I locked some properties to allow the three empty just to move along the z axis.
That's it.
To change the perspective you can drag camTarget and camRing. To lift the whole system without changing the perspective you can drag camAll.
Downloads:
Blitting - The art of fast Pixel drawing
Back in 2009 I had a blog about flash game development. After taking it offline I've got some requests to put some content back online. Today I found a backup of the blog and some posts still seem to be interessting to me. So I'll repost some of them here. This is one of them.
To display objects on screen in flash games Movieclips or Sprites are used very often. Sure this is the easiest way to handle it and if there are not much objects this is OK. But when performance comes in play there is a much better way to display objects - blitting. Blitting reduces the overhead of managing display objects in the flash player and allows you to use the saved CPU power to display more objects or to use it where you really need it.
Blitting
Blitting stands for BLock Image Transfer and describes a technique of drawing pixels on screen. The idea is quite simple. Instead of creating tons of MovieClips we create one Bitmap and paint all objects on it. So the flash player has just to manage one object. With flash 8 (I think) the BitmapData object was introduced. This object allows direct access of pixel data in images. And this is what we are going to do.
For this I'll write the same application one version with MovieClips and a second version with blitting. The application will be very simple. It will create moving objects on screen and as long as a certain FPS count isn't reached flash will add one object. If the FPS count falls to much one object will be removed automatically.
The average number of objects on screen will indicate which version runs at a better performance.
I'll not describe how to create MovieClips, but I'll explain how blitting is done.
First we need the BitmapData object. The BitmapData object represents the content of a Bitmap object. It gives us direct access on pixel basis. Additionally we need a Bitmap object. This object represents the display object we can add to stage, we also link our bitmapData object to it. This is the way our pixels comes on screen.
======================== AS3-Source code:begin
...
import flash.display.BitmapData;
import flash.display.Bitmap;
...
var screenData:BitmapData = new BitmapData(640,480,true,0x00000);
var screen:Bitmap = new Bitmap(screenData);
addChild(screen);
...
======================== AS3-Source code:end
The BitmapData object offers different ways to manipulate its pixel content. The fastest was to bring something to it is the function copyPixels. With this functions we can transfer pixel data from one BitmapData object to another one. We also can determine the position where pixels will appear. For this we need an additional BitmapData object holding the data we want to show on screen. To do this we are simply drawing a MovieClip on it.
======================== AS3-Source code:begin
For more information about BitmapData object follow this link:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html
demofile using MovieClips: Demo with Movieclip
demofile using blitting: Demo with blitting
Here you can download the source of the demo files: Source code for demo files
To display objects on screen in flash games Movieclips or Sprites are used very often. Sure this is the easiest way to handle it and if there are not much objects this is OK. But when performance comes in play there is a much better way to display objects - blitting. Blitting reduces the overhead of managing display objects in the flash player and allows you to use the saved CPU power to display more objects or to use it where you really need it.
Blitting
Blitting stands for BLock Image Transfer and describes a technique of drawing pixels on screen. The idea is quite simple. Instead of creating tons of MovieClips we create one Bitmap and paint all objects on it. So the flash player has just to manage one object. With flash 8 (I think) the BitmapData object was introduced. This object allows direct access of pixel data in images. And this is what we are going to do.
For this I'll write the same application one version with MovieClips and a second version with blitting. The application will be very simple. It will create moving objects on screen and as long as a certain FPS count isn't reached flash will add one object. If the FPS count falls to much one object will be removed automatically.
The average number of objects on screen will indicate which version runs at a better performance.
I'll not describe how to create MovieClips, but I'll explain how blitting is done.
First we need the BitmapData object. The BitmapData object represents the content of a Bitmap object. It gives us direct access on pixel basis. Additionally we need a Bitmap object. This object represents the display object we can add to stage, we also link our bitmapData object to it. This is the way our pixels comes on screen.
======================== AS3-Source code:begin
...
import flash.display.BitmapData;
import flash.display.Bitmap;
...
var screenData:BitmapData = new BitmapData(640,480,true,0x00000);
var screen:Bitmap = new Bitmap(screenData);
addChild(screen);
...
======================== AS3-Source code:end
The BitmapData object offers different ways to manipulate its pixel content. The fastest was to bring something to it is the function copyPixels. With this functions we can transfer pixel data from one BitmapData object to another one. We also can determine the position where pixels will appear. For this we need an additional BitmapData object holding the data we want to show on screen. To do this we are simply drawing a MovieClip on it.
======================== AS3-Source code:begin
...
import flash.display.MovieClip;
...
var mc:MovieClip = new Unit(); // Unit is the MovieClip in the Library
var objectData:BitmapData = new Bitmapdata(42,42,true,0x000000);
objectData.draw(mc); // this draws mc to objectData
...
======================== AS3-Source code:end
======================== AS3-Source code:end
Technically this is all we need to do.
X and Y describes the point where objectData is drawn in screenData.
For more information about BitmapData object follow this link:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/BitmapData.html
demofile using MovieClips: Demo with Movieclip
demofile using blitting: Demo with blitting
Here you can download the source of the demo files: Source code for demo files
Abonnieren
Posts (Atom)