Code Monkey home page Code Monkey logo

polargraph_server_polarshield's Introduction

polargraph_server_polarshield

Polargraph Server for ATMEGA2560 based arduino boards, primarily targetting a Polarshield v2.x motor controller. This was the standard board for PolargraphSD machines made from 2014 to 2018.

This doesn't seem to compile in Arduino IDE v1.8.6! Why? I don't know! It works fine in 1.8.5. It also doesn't work in the online web Arduino IDE.

** Please note! From mid-2018, development of new features has moved onto a ESP32-based platform. The codebase has changed to do this, and so v2 of this code is in a separate repo: https://github.com/euphy/polargraph_server_polarshield_esp32 **

A Polarshield v2.x is an add-on board for an Arduino MEGA that provides two stepper drivers, an SD card reader and an LCD touchscreen. The firmware may also be configured at compile time to target RAMPS, though without SD reader and touchscreen.

There is a precompiled binary hex file you can use if you don't want to compile from source.

  • polargraph_server_polarshield.ino.hex is for versions of the Polarshield or PolargraphSD that shipped after August 2014.

If you have a 2.2 inch screen, then you need to compile the firmware yourself.

The program has a core part that consists of the following files that are common to all Polargraph Server versions:

  • comms.ino
  • configuration.ino
  • eeprom.ino
  • exec.ino
  • penlift.ino
  • pixel.ino
  • util.ino

and

  • polargraph_server_polarshield.ino

which is named for the project.

The other source files include the extended functionality available on ATMEGA2560 boards and the Polarshield.

The file called impl_ps contains implementations of a few functions, and also contains the extended impl_executeCommand(...) which is the jumping-off point for those extended functions.

Written by Sandy Noble

Released under GNU License version 3.

http://www.polargraph.co.uk

https://github.com/euphy/polargraph_server_polarshield

polargraph_server_polarshield's People

Contributors

euphy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polargraph_server_polarshield's Issues

Error: unterminated string

First of all, thanks for sharing your great work.

I use the polarshield server comiled for an Arduino Mega/Ramps 1.4 configuration (with A4988 drivers installed for Y and E1)

The polargraph cotroller struggled with garbage on the COM Port. There is a bug in comms.ino in the function void comms_extractParams(char* inS). When allocating space for the string on stack there has to be room for the trailing 0 character at the end of a C-string. (strlen() does not count this).

Therefore the first line (line:191) of the function should read as char in[strlen(inS) + 1];
The subsequent strcpy(in, inS) takes care about the trailing 0 of a C-string. so that's OK then.

Just another hint: My A4988 drivers did not get enabled. In configuration.ino I had to set the last parameter of setPinsInverted(false, false, true) to false, because the signal isn't inverted.

Machine stuck at busy

Using RAMPS 1.4 with Arduino mega. After uploading the code to and observing the output on serial moniter gives mm per rev(default value 95) as nan. So all calculation based on it gives nan. Problem persists even after uploading machine specs.
Could it be the possible reason for machine remaining busy?

LCD_TYPE was not declared... on Ramps 1.4

Trying to compile for MOTHERBOARD RAMPS14 with Arduino 1.8.5
Installed UTFT but UTouch was replaced by URTouch. Found older uTouch release @ https://github.com/dgolda/UTouch and installed that.

Tried both with URtouch (include URToruch.h) and uTouch but does not work.

polargraph_server_polarshield:371: error: 'LCD_TYPE' was not declared in this scope

 UTFT   lcd(LCD_TYPE, 38,39,40,41);

            ^

lcd:128: error: 'LCD_TYPE' was not declared in this scope

 byte  gap = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 10 : 10;

              ^

lcd:128: error: 'LCD_TYPE' was not declared in this scope

 byte  gap = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 10 : 10;

                                       ^

lcd:128: error: 'TFT01_24_8' was not declared in this scope

 byte  gap = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 10 : 10;

                                                   ^

lcd:131: error: 'LCD_TYPE' was not declared in this scope

 static int screenWidth = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 320 : 220;

                           ^

lcd:131: error: 'LCD_TYPE' was not declared in this scope

 static int screenWidth = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 320 : 220;

                                                    ^

lcd:131: error: 'TFT01_24_8' was not declared in this scope

 static int screenWidth = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 320 : 220;

                                                                ^

lcd:132: error: 'LCD_TYPE' was not declared in this scope

 static int screenHeight = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 240 : 176;

                            ^

lcd:132: error: 'LCD_TYPE' was not declared in this scope

 static int screenHeight = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 240 : 176;

                                                     ^

lcd:132: error: 'TFT01_24_8' was not declared in this scope

 static int screenHeight = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 240 : 176;

                                                                 ^

lcd:133: error: 'LCD_TYPE' was not declared in this scope

 static int centreYPosition = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 112 : 80;

                               ^

lcd:133: error: 'LCD_TYPE' was not declared in this scope

 static int centreYPosition = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 112 : 80;

                                                        ^

lcd:133: error: 'TFT01_24_8' was not declared in this scope

 static int centreYPosition = (LCD_TYPE == ITDB24E_8 || LCD_TYPE == TFT01_24_8) ? 112 : 80;

                                                                    ^

commented
//Uncomment the following line to use a 2.4" panel, August 2014 and later
//#define LCD_TYPE TFT01_24_8
//Uncomment the following line to use an older 2.4" panel, prior to August 2014.
//#define LCD_TYPE ITDB24E_8
//Uncomment the following line to use a 2.2" panel
//#define LCD_TYPE ITDB22

#ifndef MOTHERBOARD
//#define MOTHERBOARD POLARSHIELD
#define MOTHERBOARD RAMPS14
//#define MOTHERBOARD TFTSHIELD
#endif

//#define USE_LCD

Variable frequency squarewave is not varying frequency

Reported using current code from repo and hex from zip.

"I figured out the other problem.. it looks like the pixel.ino file that you have in the most recent zip file (in /arduino-source/polargraph_server_polarshield) on the website has a tiny error.

within the pixel_drawSquarePixel function the command is:
pixel_drawSquarePixel(size, size, 3, globalDrawDirection);

where I think it should be:
pixel_drawSquarePixel(size, size, density, globalDrawDirection);

That seems to make things work!

I think this one must have also been used to compile the hex, as it produced the same effect."

Will update the repo and generate new hex.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.