Announcement

Collapse
No announcement yet.

4D display with arduino uno

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ademdeojee
    replied
    Hi Hirak,

    I think I understand what you mean by '8 Digital Pin' now.

    To do something like this, you will need to code a function to convert the slider value into binary, and output each digit as either high or low on the corresponding pin. It would look something like this (going off my previous code example):

    Code:
    if (genie.EventIs(&Event, GENIE_REPORT_EVENT, GENIE_OBJ_SLIDER, 0)) {[INDENT] [/INDENT][INDENT]slider_val = genie.GetEventData(&Event); [/INDENT][INDENT]
    for(int i = 7; i>=0; i--){[/INDENT][INDENT=2]digitalWrite(i+2, bitRead(slider_val, i));[/INDENT][INDENT]}[/INDENT]
      }
    Hopefully this should be a good starting point for you to achieve your goal.

    Regards,
    Adem

    Leave a comment:


  • Hirak Dash
    replied
    Hi Adem ,

    That's great .

    But the digital value will be in serial format ?

    I want to map slider value 120 like D2=0 , D3=1 , D4=1 , D5=1 , D6=1 , D7=0 , D8=0 , D9=0 and Change that 8 digital pin value with change with slider. i.e corresponding to slider value that 8 digital pin value change like 8 bit ADC


    Thanking you,
    Hirak

    Leave a comment:


  • ademdeojee
    replied
    Hi Hirak,

    Just a little unsure of what you mean by '8 digital pin' so hopefully I am understanding you correctly.

    If you want to write the slider value through the pin, I think the best method would be to implement the Arduino Software Serial Library, and then use the Serial.print() function to output the value. For example, you would include the library, initialise a serial port with the pins you specify, and then you could easily send the data through code similar to this example.

    Code:
    void myGenieEventHandler(void) {[INDENT]genieFrame Event; 
    genie.DequeueEvent(&Event);
    
    //this would check if you are changing the slider value
    if (genie.EventIs(&Event, GENIE_REPORT_EVENT, GENIE_OBJ_SLIDER, 0)) {
     [/INDENT][INDENT=2]//this stores the slider value[/INDENT][INDENT=2]slider_val = genie.GetEventData(&Event);
    
    
    // this will print the slider value in binary to the port you created[/INDENT][INDENT=2]softwareSerial.print(slider_val, BIN);[/INDENT][INDENT]}[/INDENT]
      }
    Hopefully you have an understanding of how you can output binary values with your Arduino. If you need more information please let me know.

    Regards,
    Adem

    Leave a comment:


  • Hirak Dash
    replied
    Hi Adem,

    Thank you for response.

    Actually I want to replicate the same PWM value in 8 digital pin.

    suppose I set slider value range from 0 to 255 . Now my slider value position is 120 . I want to replicate this 120 value on 8 digital pin i.e 1111000
    how i set that value that for every Slider value replicate on 8 bit binary in 8 digital pin


    Thanking you,

    Hirak Dash

    Leave a comment:


  • ademdeojee
    replied
    Hi Hirak,

    Do you wish to output on the Arduino Uno, or do you want to output on the Diablo processor on the display itself? I am assuming you would like output on the Arduino Uno just let me know if I am mistaken.

    I would recommend you use the ViSi-Genie Arduino Library, that way communication is easy between the display and the Arduino. First, create your ViSi-Genie project in Workshop4 and include the relevant sliders. I would suggest you have a 256 max value and 255 max value for the sliders so there is no need for input conversion. Following this, you must change their events to 'Report Message' so that they communicate to the Arduino.

    After the ViSi-Genie project is complete, you just have to add an event handler in your Arduino code to read and interpret the slider value. You should be able to then simply output the values to the appropriate pins on your Arduino. There is an example of a slider event handle on the Github Readme File.

    Let me know if you have any more questions,
    Adem

    Leave a comment:


  • Hirak Dash
    started a topic 4D display with arduino uno

    4D display with arduino uno

    Hi,

    I am using arduino uno and uLCD-70DCT-CLB for a project

    my question is that

    1. how I change 8 bit digital output with change with slider on display from 00000000 to 11111111

    2. Can I change analog voltage 0 V to 5 V , change with slider value on display in 255 step

    Thanking you,

    Hirak
Working...
X