Comments (5)
Which example? The one from https://github.com/marcelstoer/nodemcu-max7219/blob/master/README.md?
How does summy2.lua:3
look?
from nodemcu-max7219.
The official example code - summy2.lua (which should be called dummy2.lua btw) just contains the first lines of the example:
max7219 = require("max7219")
max7219.setup({debug = true, numberOfModules = 4, slaveSelectPin = 8})
max7219.write({
{ 0x20, 0x74, 0x54, 0x54, 0x3C, 0x78, 0x40, 0x00 },
{ 0x41, 0x7F, 0x3F, 0x48, 0x48, 0x78, 0x30, 0x00 },
{ 0x38, 0x7C, 0x44, 0x44, 0x6C, 0x28, 0x00, 0x00 },
{ 0x30, 0x78, 0x48, 0x49, 0x3F, 0x7F, 0x40, 0x00 }
}, { rotate = "left" })
This in conjunction with the latest max7219.lua from the repo leads to this error.
from nodemcu-max7219.
I know that it worked when I last tested. Might be that the changes I pulled in from someone else's fork (45e4460) broke something.
from nodemcu-max7219.
I could fix it by changing the code to
local c = {}
for i,char in pairs(chars) do
--for i = 1, #chars do
-- local char = chars[i]
if transformation.rotate ~= nil then
-- char = rotate(char, transformation.rotate == "left")
end
However, I still couldn't get it to work with CS connected to D8 (the default in the example) - both displays (I have connected two right now) had all LEDs turned on and nothing could change that. It also locked up the USB connection to the PC (ESPlorer). After connecting CS to D2 and changing it in the code (slaveSelectPin = 2) it works now perfectly.
from nodemcu-max7219.
I can't reproduce any of this, works just fine over here.
Furthermore, I find you initial stacktrace a bit odd:
max7219.lua:70: in function '?'
max7219.lua:177: in function 'write'
Line 70 accesses the char passed to rotate()
as a parameter. It seems to be nil so it was missing upon invocation.
Your stack trace says rotate()
was called from line 177 but that can't be. The actual invocation is further down on line 180. Be that as it may it looks as if max7219. write ()
wasn't passed any characters.
from nodemcu-max7219.
Related Issues (8)
- Allow to write arbitrary byte[] rather than table of chars
- Add "rotate" parameter to setup(), extend rotation in write() HOT 1
- Addition: Set/clear/toggle individual pixels HOT 3
- Addition: Write to specific module
- Allow to set font table so you can write strings rather than byte[]s
- Add scrolling support HOT 5
- Add oscillation support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodemcu-max7219.