initial
This commit is contained in:
commit
dd6f37a960
15 changed files with 1841 additions and 0 deletions
40
plotter.h
Normal file
40
plotter.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
// plotter.h
|
||||
|
||||
#ifndef _PLOTTER_h
|
||||
#define _PLOTTER_h
|
||||
|
||||
#include<util/delay.h>
|
||||
#include "writepin.h"
|
||||
#include "point.h"
|
||||
#include "pwm.h"
|
||||
#include "serial.h"
|
||||
#include "writepin.h"
|
||||
#include "serial.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
class Plotter
|
||||
{
|
||||
private:
|
||||
Pwm16b _pwm;
|
||||
Point currentPos = {0, 0};
|
||||
|
||||
volatile unsigned char *_penPort;
|
||||
char _penPin;
|
||||
Serial* _serial;
|
||||
|
||||
public:
|
||||
Plotter(volatile unsigned char *penPort, const char penPin, Serial* serial);
|
||||
void demo();
|
||||
void basicposition();
|
||||
void pd();
|
||||
void pu();
|
||||
void moveto(Point *pt);
|
||||
void moveto(uint16_t nx,uint16_t ny);
|
||||
|
||||
Point getCurrentPos();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue