Use a rs485 communication module #947
Replies: 34 comments
-
Posted at 2017-06-20 by @gfwilliams Hi, those displays are awesome! If you don't mind me asking, how much did your 7x7 one cost? Normal 'hardware' serial has to output on specific pins on the Original/Pico/WiFi boards (for instance look for However, it sounds like hardware serial won't do as you're limited to 7 or 8 bits. Instead, you can easily use You could do something a bit like this pretty easily:
So then all you need to do is set up the string you give to |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp @gordon, the 7x7 display is around 80€ wo VAT + 23€ for shipping to France + paypal fee the baud rate is 9600 or 19200, 38400, 57600 (physical dipswitch on the board) by ex.
0x80: header therefor your exemple need to be converted from hex value to 0/1.
regards é. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by @gfwilliams Thanks! A bit pricey, but tempting :) Yes, what you're doing is fine - but you also need to watch out for parseInt dropping the initial zeros! I'd just rewrite it as an array:
However, with 8 bits even when you're controlling the 7 bit flip dots, are you sure it's not normal serial data? eg, with one start & stop bit per byte? It seems like the most likely option by far. Do you have a link to the Arduino code? Also, Espruino does have its own graphics library & fonts in that'd be easy to use for stuff like this: https://www.espruino.com/Graphics |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp i do not put it online, for share (i'm lazy guy), i give it here...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by @gfwilliams Good enough :) Ok, it looks like you don't need anything fancy at all. Just use the standard hardware serial.
That should all work ok - it's a bit fiddly because you have to set the TX enable pin on RS485, but not the end of the world. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp Sorry it does not work
is it good or i can't use serial1 with usb plugged? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by @gfwilliams Serial1 should work fine with USB plugged in. It'll stop working when USB is unplugged, and you just need to add So you have an oscilloscope or any way to debug this? It is possible that the delay of JS execution is longer than the time we allow in the You could try |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp No oscilloscope :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by @gfwilliams Have you tried with low baudrate, with the baud rate changed in Also, maybe just try removing |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp Ok it works, i've used your idea and tried with other value. I'll try with a pin in high |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp Thanks very much @gordon I've use the digitalWrite(TX_ENABLE_PIN, 1) Alfazeta display are compatible with espruino👏🏼🎉 and with a simple way... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by @gfwilliams Great! Now you need to try:
You can even use stuff like (I made the graphics 8px x 7px so that each row/column aligns properly) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp i create a post in project category |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-21 by @gfwilliams Thanks! That's great! I've always liked those displays, but have never been able to justify getting any. It's nice to see they're actually really easy to interface to. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-26 by Mrbbp Hello @gordon second question is about setinterval sending data. thanks |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp
just try this un/comment the setFontDennis8() my texte var is about 2500 char long... regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp do i need to troncate the texte by smaller unit? is it the conversion to bitmap that is time consuming? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp @gordon without setFontDennis();
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by @gfwilliams Aha! Yes, drawing a small novel on to your 7x7 LCD screen would definitely slow things down :) It is the actual drawing of the characters to the bitmap that takes a while - I don't believe I ever skipped drawing characters if they were offscreen, because I thought that would be quite rare. To speed it up, I'd try and split it into smaller chunks. To be honest even calling OR I just fixed it, so if you use one of the cutting edge build at http://www.espruino.com/binaries/travis/2cdc51943388fe3d1944936bf02ad7fae9e0258c it'll be a lot faster. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp @gordon, with that code there is a slowing down of the frame rate with/without the how to reduce the delay? in other way why your custom font is quicker use than an external font? regards
ps: i define only one time (in this code) the ps:2 with shorter text, it's quicker but not that much. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp and yes @gordon, it's a long text and it is exactly why i work with Espruino, . more ram :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by @gfwilliams :) The custom font is slower because Espruino has to unpack it from RAM - in Espruino things sometimes aren't stored in one block of memory to work around fragmentation - so for every access it has to check. When using the built-in font it's using very specific, fast code to access flash. Did you try the new firmware I linked? That should be a lot faster. Actually thinking about it, it seems that You might get faster rendering by doing:
So basically Dennis8, but with I'll make a note to improve |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp timing test
1v92 FIRMWARE 1v92 CUSTOM FIRMWARE therefor best result with: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-27 by Mrbbp An other issue with the standart 1v92 firmware. with your custom firmware it always upload to board thanks é. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-28 by @gfwilliams Great! That's a definite improvement - and I'll see about trying to build the Very strange about your crash during upload though - I don't know what would have changed. If you're not doing 'save on send' then absolutely everything you do when you upload should get erased just by unplugging and replugging. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-28 by Mrbbp The crash is not an espruino issue, it's an usb issue, it produce too sometime with arduino... For the upload problem, i don't know, i've discovered the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-28 by @gfwilliams The Web IDE should do a However if you have a very short |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-28 by @MaBecker Wow - this looks great! found some cheaper flip dots https://hannio.org/en/?s=FlipDot&post_type=product 5x7 FlipDot controller + 5x 1x7 FlipDots for 40€ plus shipping to bad no controller on stock :( |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-29 by Mrbbp I've bought it...😎 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-09-09 by Mrbbp Controller back in stock !!! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-20 by Mrbbp
Hello,
I've worked/played with a flipdot display from alfazeta (7x7 dots) with an arduino. The display is driven by an rs485 protocole and specific ordered bits...
I would like to use an espruino to do it again.
On arduino we use a software serial
I've read that there is no software serial on espruino
Do i have to use the serial module on specific pin or it is not possible... Not sure to understand?
The display use a specific ordered bit sentence compose with 3 bits for command, x bits for data display (depend of size), and an end bit.
Is there an example somewhere to start coding?
Regards
éric
Beta Was this translation helpful? Give feedback.
All reactions