-
Transcript
05/25/2018 at 20:13 • 0 comments3:01 PM
Hello @Lindy Thank you for organizing this :-)
In the meantime, you can all put your questions here > https://hackaday.io/event/158266-making-programming-easier and @Boian Mitov could give us an introduction?
3:02 PM
Yeah, thanks for hosting this one, Lindy!
Tx_Flash joined the room.
3:02 PM
3:02 PM
Well... to make the story short... I am very lazy person :-D
3:03 PM
So I don't like to spend a lot of time writing code if I can do it easier :-D
3:03 PM
So I have this constant drive to find ways to program stuff easier, faster and with less maintenance
3:03 PM
Making programming easier: Breed better humans!
:o)
3:03 PM
:-D
3:04 PM
I mean I am very frustrated with the general state of the SW industry
Andrew Davis joined the room.
3:04 PM
3:04 PM
We are still using programming methods that are now I think over 200 years old
3:05 PM
We need to find better ways, especially with the rapidly changing and evolving world of "computing"
3:05 PM
Something being old doesn't make it bad
3:05 PM
and when I say "computing" I do not mean only CPUs
3:05 PM
but GPS, FPGAs as well as clusters, and clouds
3:05 PM
python code publishe
3:05 PM
d
3:06 PM
so this is the short story :-D
Great! We're super excited to have you. We'll get started with some questions.
3:07 PM
Than you! :-)
19-rsn-007 joined the room.
3:07 PM
Question from @Stephen Tranovich "Are there any problems or algorithms which lend themselves more readily to visual programming versus tradition text based programming? Are there any problem or algorithm types which are more challenging to tackle with visual programming?"
3:08 PM
Well... there are no problems that can't be solved easier with graphical programming, but I hate the word "algorithm"
3:08 PM
algorithms are sequential by nature and very inefficient for modern computing
3:08 PM
I think they should be banned at some point :-D
3:08 PM
I avoid using algorithms as much as I can
3:09 PM
hah!
3:09 PM
even in text based programming I almost never use algorithms any more
3:09 PM
thats easy, just boss other people around to write your code
3:09 PM
:-D
3:09 PM
I like writing my own code ;-)
3:10 PM
i thought algorithm is just a fairly generic term? which would encompass serial/parallel solutions?
3:10 PM
if someone else writes it with algorithm it will be slow and inefficient
3:10 PM
no, algorithm is specific to sequential execution, at least in contemporary terminology
3:11 PM
I thought it was a generic term as well, whoopsies
3:11 PM
are you sure, as people talk about quantum algorithms etc. too
3:11 PM
modern computing executes for most parts if variety of parallel execution forms
3:11 PM
and sometimes in FPGA
3:12 PM
so algorithm can't translate efficiently for FPGA as example
3:12 PM
dataflow representation can
3:12 PM
so the problem is less of graphical vs. text based
3:12 PM
and more in terms of sequential or dataflow/processing representation
3:13 PM
So what do you use to do a specific or repetitive task if not an algorithm?
3:13 PM
A block representing the task ;-)
3:14 PM
The task is performed over some data or IO
3:14 PM
so the task is not "repetitive" it simply happens as soon as there is new data
3:14 PM
You can think of it as a process within OS
3:14 PM
typical example
3:15 PM
in Arduino if you want to blink LED you put code to turn on wait turn off wait and loop
3:15 PM
good now you blink LED in repetetive task
3:15 PM
the problem is what happens if you need to blink another LED 3.7 times faster at the same time
3:15 PM
now what
3:15 PM
?
3:16 PM
The issue is that you don't want a loop, you want to blink LED
3:16 PM
so you unnaturally translated the need to have a blinking "task" into a loop because that's what the language offered
3:16 PM
but really you wanted a "task" that blinks the LED
3:17 PM
In Visuino you add a pulse generator, connect it to LED and it starts blinking
3:17 PM
if you want to blink another LED you add another generator
3:17 PM
set the frequency and it starts blinking
3:17 PM
Well I just learned via google search "visuino" and "visduino" are entirely different ends of the spectrum.
3:17 PM
and you keep adding stuff as needed
3:18 PM
:-D
3:18 PM
same board, multiple blink rates?
3:18 PM
haha @Jon Raymond
3:18 PM
yes
3:18 PM
same board different blink rates
3:18 PM
Sounds like event-driven programming
3:18 PM
yes it is actually
3:19 PM
dataflow programming and event driven programming have a lot of simularities
3:19 PM
Visuino does both together ;-)
>span class="s8">@Liam Kennedy has a question that might be a good starter before we get too into the technical "As someone who is new to the Arduino world.. who wants to get in to ESP8266 / ESP32 can you give me any "newbie" tips to getting in to that world with Visuino? I'm looking to query web api's (JSON) and display stuff on attached OLED displays and flash "neopixel" RGBs. I have some basics working using the OLD paradigm (Arduino IDE).. so interested how quickly I can jump to YOUR method"
3:20 PM
@Liam Kennedy You can start with something really simple like this:
https://www.instructables.com/id/Remote-Wi-Fi-DHT11-Temperature-an-Humidity-I2C-2-X/
3:20 PM
And then do something like this:
3:20 PM
Hold on the ESP32 as setting up the toolchain is still more complicated than I think it should be. ESP8266 toolchain is quite well developed now.
3:20 PM
https://www.instructables.com/id/ESP8266-and-Visuino-DHT11-Temperature-and-Humidity/
ESP8266 and Visuino: DHT11 Temperature and Humidity Web Server
Hi BoianM, I'v a problem with visuino is that after uploading my Arduino generated code I can't get anything in dht11server on my PC's google web browser.
3:21 PM
And finally this:
https://www.instructables.com/id/ESP8266-and-Visuino-DHT11-Temperature-and-Humidity/
3:21 PM
Visuino supports both ESP8266 and ESP32
3:22 PM
and adds some goodies missing from the ESP32 toolchain such as Servo support and PWM ;-)
3:22 PM
Since I write all the libraries for it anyway :-D
3:22 PM
how do you implement arrays with it, like if you want to calculate prime numbers with the sieve of Eratosthenes, or Game of Life etc. ?
Lets try to keep questions psoted to the discussion here please > https://hackaday.io/event/158266-making-programming-easier
3:23 PM
Yeah.. I started with the unit's here-> https://github.com/ThingPulse/esp8266-weather-station
3:23 PM
One interesting aspect of what I mentioned of the 2 LED blinkings is that the Visuino design can in theory be programmed in FPGA as well... so I am working toward supporting FPGAs too at some point ;-)
3:23 PM
Visuino supports arrays too :-)
3:23 PM
Thanks for the links
3:25 PM
Another from @Stephen Tranovich " So Visuino takes blocks, translates it into embedded C or Arduino language and uploads that info to the Arduino? I suppose my question is: Is Visuino built "on top" of the traditional coding languages and therefore has to be translated back to them before it is used?"
3:26 PM
Whoa, FPGA support PLEASE!
3:26 PM
Yes, very interesting question :-) And the answer is that Visuino is the same as C++ :-) C++ compiles to Assembler, Visuino compiles to C++
3:26 PM
So in essence everything is compiled down to assembler
3:27 PM
So it goes Visuino -> C++ -> Assembly
3:27 PM
what is interesting is that the same Visuino design when compiled for different board generates a different C++ optimizing it for the specific hardware
3:27 PM
-> board
3:27 PM
how big is the Visuino user base currently?
3:27 PM
Wow, that is cool
3:27 PM
exactly the same way as C++ compiles to specific assembler per processor
3:27 PM
but sounds like this is not optimal. C is sequential and visuino is parallel, right?
3:28 PM
you can do threads in C ;)
Lets try to keep questions posted to the discussion here > https://hackaday.io/event/158266-making-programming-easier
3:28 PM
@lindy was the same question, but about more details :-)
3:28 PM
The user base is about 36000 at the moment, at least based on the registered accounts. Registration is optional however so it can be bigger
3:29 PM
Visuino will also use interrupts when applicable :-)
3:29 PM
That's epic!
3:29 PM
Visuino generates code to handle interrupts if the pin where the module is connected supports it
3:30 PM
so the same module will generate different code when connected to interrupt or non interrupt pin
3:31 PM
in multiprocessor systems, Visuino tries to use the multiple cores for the execution :-)
3:31 PM
And I am constantly improving the code generation
3:31 PM
It already generates code that is on average more optimized than the typical developers code, and I am pushing for much more :-)
3:32 PM
but in C I have more control about e.g. interrupt priority, this is all lost in translation then
3:32 PM
Does Visuino use direct port manipulation or does it build with arduino's digital/analog write etc?
A question from @Lutetium "Can Visuino be used for any Arduino based boards? "
3:34 PM
Visuino was initially developed only for Arduino boards :-)
3:34 PM
So yes, it supports them very much all
3:34 PM
now it supports many more controllers
3:35 PM
is there any version of arduino that it works with better than others?
3:35 PM
Sometimes it uses the direct port manipulation, and sometimes the analor/digital read/write
3:35 PM
again it makes the decision on design by design cases
3:35 PM
and in some cases it uses the intreeupts
3:35 PM
or does that have more of a task based answer
Another from @Liam Kennedy " Just checking how Visuino supports boards/add-ons (like OLED displays).. do YOU build all the libraries to support programming for that? If that's the way it works - how do we find out which boards/components are supported?"
3:36 PM
it also is designed so most modules can be connected to GPIO I2C SPI etc. expanders as well as to the main board pins
3:37 PM
Practically all the libraries are developed by me for now. There are couple of other people that have developed some components, and I posted tutorials on component development
3:37 PM
I am working to make the component development itself an easy visual process
3:37 PM
the best way is to download Visuino and see if there is component for your device
3:38 PM
Black and White OLEDs are supported
3:38 PM
I am adding support for color OLEDs now
3:38 PM
xome color TFT displays are also supported
3:39 PM
if a device is not supported you can contact me and I will see what I can do to sneak in support for it ;-)
>span class="s8">@leb9049 "There are many ways to achieve the same thing in programming, the “pulse generator” for example, I would implement this differently depending on other requirements and resources needed for a projects as well as how accurately I need these pulse. If I have a hardware timer available and really need some accurate pulses I'd use that. It seems like any abstraction layer, even the layer that the Arduino IDE provides allows you to gloss over some details, which can be handy, but I’ve seen many people that didn’t knowing what is going on under the hood with an arduino go to a lot of trouble to implement something when one layer down it would have been a lot easier, simpler, and quicker to solve.
Is there a way to dig deeper when it's required or are you stuck in the sandbox?"
3:39 PM
Sometimes if I don't have the device and someone needs support for it, I expect them at least to get me the device so I can tyest with it ;-)
3:40 PM
@leb9049 Well... this is the same type of argument as C++ vs Assembly language
Tebjan Halm joined the room.
3:41 PM
3:41 PM
>span class="s3">@Boian Mitov - Downloading
3:41 PM
Is there a full list of supported boards? I don't see any SamD21/D51 boards listed?
3:41 PM
This is exactly the argument I had with people ~25 years ago when I moved to C/C++ development and others ware pusing for Assembler
3:41 PM
I can still reach the registers from c++, can you with Visuino?
3:41 PM
the easiest way to see the current list of boards is to run Visuino and double click on the Arduino component
3:41 PM
it will open the list of boards
3:42 PM
Well... there is also the experimental Visuino Pro - now in Beta
from @nwmaker and @Lutetium "It sounds like Visuino can support a variety of hardware. What is the process for configuring your hardware situation like? / How does Visuino get the board specifics? "
3:42 PM
and I can do inline assembler in C, Visuino should have inline C then as well
3:42 PM
It allows you to write pieces of code in C++ to be executed at specific time or over specific data ;-)
3:43 PM
So yes with the Pro version you can access registers if you wish, and it will come with the same price as when you inject assembly code in C++ ;-)
3:44 PM
@nwmaker and @Lutetium I map the boards one by one with their specific capabilities pin by pin ;-)
3:45 PM
One of the benefits of this is that you actually can see what your board can do right away as soon as you select it :-)
Cool! We have about 15 minutes left, did you want to take this time to show us some examples @Boian Mitov ?
3:46 PM
Here is a mapped ESP32 LoRa Heltec board
3:46 PM
3:46 PM
You can see that it has Hall sensor, display, WiFi and LoRa :-)
3:47 PM
You want some demo ?
3:47 PM
YES
yeah!
3:47 PM
YEAH
3:47 PM
I've seen you demo at the Supplyframe. but that was a long time ago
3:48 PM
So here is how we can see the values from analog pin:
3:48 PM
3:48 PM
how often will that happen
3:48 PM
asap? and repeat?
3:49 PM
3 pulse generators on 3 pins:
3:49 PM
3:49 PM
I think this this Visuino stuff is great development
3:49 PM
great to get people started that have no programming experience
3:50 PM
Now the frequency of one of the generators is controlled with analog pin ;-)
3:50 PM
3:50 PM
i must admin i realized i have visuino installed without a license after joining thit hackchat ;)
3:50 PM
admint*
3:50 PM
admit*
3:50 PM
software VCO
3:50 PM
(admin freudian slip)
3:51 PM
3:51 PM
I have used arduino the old fashioned way, but I am sure gonna play around with this a little
3:51 PM
Controlling the 3 generators with Wii controller ;-)
3:51 PM
seems to me more now than last time i tried it that its worth the 20 bucks
3:52 PM
In this case we control the frequency and the asymmetry of the generator with the joystick
3:53 PM
Display analog values on OLED display:
3:53 PM
3:54 PM
Displaying pressure humidity and temperature on the OLED
3:54 PM
3:55 PM
each one at different location on the screen
3:55 PM
Controlling the speed of a stepper with analog pin:
3:55 PM
3:57 PM
hi @Boian Mitov just wanted to stop in and say hi and thanks for all the smart work on Visuino
3:57 PM
where do you specify the update rate of the display?
3:57 PM
You don't It automatically updates
3:57 PM
but you can add clock generator to refresh it at specific time
3:57 PM
moment will show you in few seconds
3:58 PM
Controlling robot motors with joystick:
3:58 PM
3:58 PM
For me I'd want to query a web api every "xx" seconds and display result
3:58 PM
But that's "my thang"... hah.
3:59 PM
Controlling the robot with PS2 controller
3:59 PM
3:59 PM
this looks like it can get very confusing for bigger projects, is it hierarchical, so can you define sub-blocks and sub-sub-blocks?
3:59 PM
Actually for querying server at specific times you can follow my instructables ;-)
3:59 PM