Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fill #56

Closed
s-celles opened this issue Sep 19, 2018 · 1 comment
Closed

use fill #56

s-celles opened this issue Sep 19, 2018 · 1 comment

Comments

@s-celles
Copy link
Owner

s-celles commented Sep 19, 2018

https://github.com/scls19fr/Nextion.jl/blob/f89de1af9050335eff1239c198bb05c274cde2c4/examples/waveform.jl#L7-L20

@s-celles
Copy link
Owner Author

julia> vals = fill(UInt8(0), (4,))
4-element Array{UInt8,1}:
 0x00
 0x00
 0x00
 0x00

julia> for (i, val) in enumerate(vals)
         vals[i] = val + i * delta_v
       end

julia> vals
4-element Array{UInt8,1}:
 0x33
 0x66
 0x99
 0xcc

should also close #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant